org.apache.jetspeed.cluster
Class NodeManagerImpl

java.lang.Object
  extended by org.apache.jetspeed.cluster.NodeManagerImpl
All Implemented Interfaces:
org.apache.jetspeed.cluster.NodeManager, org.springframework.beans.factory.BeanFactoryAware

public class NodeManagerImpl
extends Object
implements org.apache.jetspeed.cluster.NodeManager, org.springframework.beans.factory.BeanFactoryAware

Node Manager

Version:
Author:
Hajo Birthelmer

Field Summary
private  org.springframework.beans.factory.BeanFactory beanFactory
          added support for bean factory to create profile rules
protected static org.apache.commons.logging.Log log
           
private  String nodeInformationBean
          the default criterion bean name
private  HashMap nodes
           
private  File rootIndexDir
           
 
Fields inherited from interface org.apache.jetspeed.cluster.NodeManager
INVALID_NODE_REQUEST, NODE_NEW, NODE_OUTDATED, NODE_SAVED
 
Constructor Summary
NodeManagerImpl(String indexRoot, String nodeInformationBean)
           
 
Method Summary
 void addNode(Long id, String contextName)
           
 int checkNode(Long id, String contextName)
           
protected  org.apache.jetspeed.cluster.NodeInformation createNodeInformation()
           
 int getNumberOfNodes()
           
protected  void load()
           
 void removeNode(String contextName)
           
protected  void save()
           
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

beanFactory

private org.springframework.beans.factory.BeanFactory beanFactory
added support for bean factory to create profile rules


nodes

private HashMap nodes

rootIndexDir

private File rootIndexDir

nodeInformationBean

private String nodeInformationBean
the default criterion bean name

Constructor Detail

NodeManagerImpl

public NodeManagerImpl(String indexRoot,
                       String nodeInformationBean)
                throws Exception
Throws:
Exception
Method Detail

save

protected void save()

load

protected void load()

checkNode

public int checkNode(Long id,
                     String contextName)
Specified by:
checkNode in interface org.apache.jetspeed.cluster.NodeManager

addNode

public void addNode(Long id,
                    String contextName)
             throws Exception
Specified by:
addNode in interface org.apache.jetspeed.cluster.NodeManager
Throws:
Exception

removeNode

public void removeNode(String contextName)
                throws Exception
Specified by:
removeNode in interface org.apache.jetspeed.cluster.NodeManager
Throws:
Exception

createNodeInformation

protected org.apache.jetspeed.cluster.NodeInformation createNodeInformation()
                                                                     throws ClassNotFoundException
Throws:
ClassNotFoundException

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

getNumberOfNodes

public int getNumberOfNodes()
Specified by:
getNumberOfNodes in interface org.apache.jetspeed.cluster.NodeManager


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.