org.apache.jetspeed.cluster
Class NodeManagerImpl
java.lang.Object
org.apache.jetspeed.cluster.NodeManagerImpl
- All Implemented Interfaces:
- NodeManager, org.springframework.beans.factory.BeanFactoryAware
public class NodeManagerImpl
- extends java.lang.Object
- implements NodeManager, org.springframework.beans.factory.BeanFactoryAware
Node Manager
- Version:
- Author:
- Hajo Birthelmer
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Constructor Summary |
NodeManagerImpl(java.lang.String indexRoot,
java.lang.String nodeInformationBean)
|
Method Summary |
void |
addNode(java.lang.Long id,
java.lang.String contextName)
Add a new node or update the id of an existing one...(i.e. |
int |
checkNode(java.lang.Long id,
java.lang.String contextName)
Returns the current "knowledge" about a given node (i.e. |
protected NodeInformation |
createNodeInformation()
|
int |
getNumberOfNodes()
return the number of currently stored nodes |
protected void |
load()
|
void |
removeNode(java.lang.String contextName)
Remove a node |
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 |
log
protected static final org.apache.commons.logging.Log log
NodeManagerImpl
public NodeManagerImpl(java.lang.String indexRoot,
java.lang.String nodeInformationBean)
throws java.lang.Exception
- Throws:
java.lang.Exception
save
protected void save()
load
protected void load()
checkNode
public int checkNode(java.lang.Long id,
java.lang.String contextName)
- Description copied from interface:
NodeManager
- Returns the current "knowledge" about a given node (i.e. the portlet application).
If the contextName doesn't exist NODE_NEW is returned.
An id requested newer than what is stored is indicated by NODE_OUTDATED.
- Specified by:
checkNode
in interface NodeManager
- Returns:
addNode
public void addNode(java.lang.Long id,
java.lang.String contextName)
throws java.lang.Exception
- Description copied from interface:
NodeManager
- Add a new node or update the id of an existing one...(i.e. the portlet application) to the local info
- Specified by:
addNode
in interface NodeManager
- Throws:
java.lang.Exception
removeNode
public void removeNode(java.lang.String contextName)
throws java.lang.Exception
- Description copied from interface:
NodeManager
- Remove a node
- Specified by:
removeNode
in interface NodeManager
- Throws:
java.lang.Exception
createNodeInformation
protected NodeInformation createNodeInformation()
throws java.lang.ClassNotFoundException
- Throws:
java.lang.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()
- Description copied from interface:
NodeManager
- return the number of currently stored nodes
- Specified by:
getNumberOfNodes
in interface NodeManager
- Returns:
Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.