|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.carol.cmi.controller.common.AbsClusterViewManager
org.ow2.carol.cmi.controller.server.AbsServerClusterViewManager
org.ow2.carol.cmi.controller.server.impl.jgroups.JGroupsClusterViewManager
@ThreadSafe public final class JGroupsClusterViewManager
Manager implemented with JGroups that contains CMI logic for the server-side.
DistributedTree| Field Summary | |
|---|---|
static boolean |
isChannelClosed
True if the channel is closed |
| Method Summary | |
|---|---|
protected void |
addCMIReference(org.ow2.carol.cmi.reference.CMIReference cmiReference)
Adds a CMIReference to the cluster view. |
protected void |
addDistributedObjectInfo(java.lang.String objectName,
org.ow2.carol.cmi.controller.server.DistributedObjectInfo distributedObjectInfo)
Add informations on the clustered object with the given name. |
void |
addPoolToEmpty(java.lang.String objectName)
Adds the pool of the object with the given name of the list of pool that should be empty. |
void |
addServerToBlackList(org.ow2.carol.cmi.reference.ServerRef serverRef)
Add a server to the blacklist. |
void |
channelClosed(org.jgroups.Channel arg0)
|
void |
channelConnected(org.jgroups.Channel arg0)
|
void |
channelDisconnected(org.jgroups.Channel arg0)
|
void |
channelReconnected(org.jgroups.Address arg0)
|
void |
channelShunned()
|
protected boolean |
containObject(java.lang.String objectName)
Returns true if the given object is already replicated. |
void |
doStart()
Start the server-side manager. |
void |
doStop()
Stop the server-side manager. |
java.util.Set<java.lang.String> |
getClusterNames()
Returns the set of name of cluster. |
java.util.List<org.ow2.carol.cmi.reference.CMIReference> |
getCMIReferences(java.lang.String objectName)
Returns a list of CMIReference for an object with the given name. |
java.util.List<org.ow2.carol.cmi.reference.CMIReference> |
getCMIReferences(java.lang.String objectName,
java.lang.String protocolName)
Returns a list of CMIReference for an object with the given name and protocol. |
int |
getDelayToRefresh()
Returns the time between each update of the cluster view by clients. |
protected org.ow2.carol.cmi.controller.server.DistributedObjectInfo |
getDistributedObjectInfo(java.lang.String objectName)
Returns informations on this object. |
int |
getLoadFactor(org.ow2.carol.cmi.reference.ServerRef serverRef)
Returns the load-factor for the server with the given address. |
int |
getNbClientsConnectedToProvider()
|
java.util.Set<java.lang.String> |
getObjectNames()
|
java.util.Set<java.lang.String> |
getObjectNames(java.lang.String clusterName)
Returns the set of name of object for a given name of cluster. |
java.util.Set<java.lang.String> |
getServerObjectForProtocol(java.lang.String serverUrl,
java.lang.String protocolName)
Gets all objects hosted on a given server started with the given protocol. |
java.util.Set<org.ow2.carol.cmi.reference.ServerRef> |
getServerRefs(java.lang.String protocolName)
Return the list of servers for a given protocol. |
protected void |
initStats()
Initialize the statistics. |
boolean |
isPoolToEmpty(java.lang.String objectName)
Returns true if the pool for object with the given name should be empty. |
boolean |
isServerBlackListed(org.ow2.carol.cmi.reference.ServerRef serverRef)
Return true if the server with the given reference if blacklisted. |
void |
nodeAdded(java.lang.String fqn,
java.io.Serializable element)
|
void |
nodeModified(java.lang.String fqn,
java.io.Serializable oldElement,
java.io.Serializable newElement)
|
void |
nodeRemoved(java.lang.String fqn)
|
void |
registerClient(java.util.UUID uuid)
Register a new client. |
void |
removeCMIReference(org.ow2.carol.cmi.reference.CMIReference cmiReference)
Removes a CMIReference from the cluster view. |
void |
removePoolToEmpty(java.lang.String objectName)
Removes the pool of the object with the given name of the list of pool that should be empty. |
void |
removeServerFromBlackList(org.ow2.carol.cmi.reference.ServerRef serverRef)
Remove a server to the blacklist. |
void |
setDelayToRefresh(int delay)
Sets the time between each update of the cluster view by clients. |
protected void |
setDistributedObjectInfo(java.lang.String objectName,
org.ow2.carol.cmi.controller.server.DistributedObjectInfo distributedObjectInfo)
Sets informations on the clustered object with the given name. |
void |
setLoadFactor(org.ow2.carol.cmi.reference.ServerRef serverRef,
int loadFactor)
Sets the load-factor for the server with the given address. |
void |
viewChange(java.util.Vector<org.jgroups.Address> newMbrs,
java.util.Vector<org.jgroups.Address> oldMbrs)
|
| Methods inherited from class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManager |
|---|
addObjectInstance, addObjectToWatch, addProtocol, getApplicationExceptionNames, getAvailableLBPoliciesAndStrategies, getBusinessName, getClusterName, getDateOfProperties, getInetAddress, getInitialContextFactoryName, getInterface, getItfName, getJMXServiceURL, getLBPolicyClass, getLBPolicyClassName, getLBStrategyClass, getLBStrategyClassName, getMaxPoolSize, getMinPoolSize, getPropertiesForLBPolicy, getPropertyForLBPolicy, getProtocols, getProviderURLs, getRefOnLocalRegistry, getRemoteClass, getServerClusterViewManager, hasState, isClustered, isEmbeddedLBPolicy, isEmbeddedLBStrategy, isReplicated, isReplicationManagerStarted, setAlgorithmForLBPolicy, setLBPolicyClassName, setLBStrategyClassName, setMaxPoolSize, setMinPoolSize, setPropertiesForLBPolicy, setPropertyForLBPolicy, setReplicationManagerStarted, start, stop |
| Methods inherited from class org.ow2.carol.cmi.controller.common.AbsClusterViewManager |
|---|
getClusterViewManager, getCmiThreadFactory, getLBPolicy, getLocalMaxPoolSize, getLocalMinPoolSize, getNamesOfWatchedObject, getPool, getSessionId, getUUID, hasPool, isWatched, setClusterViewManager, setLocalMaxSize, setLocalMinSize, setPool, updateLBPolicy, watch |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ow2.carol.cmi.controller.common.ClusterViewManager |
|---|
getLBPolicy, getPool, getSessionId, getUUID, setPool |
| Field Detail |
|---|
public static final boolean isChannelClosed
| Method Detail |
|---|
public void doStart()
doStart in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerpublic void doStop()
doStop in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerprotected boolean containObject(java.lang.String objectName)
containObject in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerobjectName - a name of object
protected org.ow2.carol.cmi.controller.server.DistributedObjectInfo getDistributedObjectInfo(java.lang.String objectName)
throws org.ow2.carol.cmi.reference.ObjectNotFoundException
getDistributedObjectInfo in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerobjectName - a name of object
org.ow2.carol.cmi.reference.ObjectNotFoundException - if the given object is not found
protected void addDistributedObjectInfo(java.lang.String objectName,
org.ow2.carol.cmi.controller.server.DistributedObjectInfo distributedObjectInfo)
addDistributedObjectInfo in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerobjectName - a name of objectdistributedObjectInfo - informations on the clustered object
protected void setDistributedObjectInfo(java.lang.String objectName,
org.ow2.carol.cmi.controller.server.DistributedObjectInfo distributedObjectInfo)
setDistributedObjectInfo in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerobjectName - a name of objectdistributedObjectInfo - informations on the clustered object
public java.util.Set<org.ow2.carol.cmi.reference.ServerRef> getServerRefs(java.lang.String protocolName)
throws org.ow2.carol.cmi.controller.server.ServerClusterViewManagerException
getServerRefs in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerprotocolName - a name of protocol
org.ow2.carol.cmi.controller.server.ServerClusterViewManagerException - if the given protocol name doesn't exist
public java.util.Set<java.lang.String> getServerObjectForProtocol(java.lang.String serverUrl,
java.lang.String protocolName)
throws org.ow2.carol.cmi.controller.server.ServerClusterViewManagerException
getServerObjectForProtocol in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerserverUrl - a server referenceprotocolName - a given protocol
org.ow2.carol.cmi.controller.server.ServerClusterViewManagerException - if the protocol name doesn't exist or the server is not bound on the given protocol
public java.util.List<org.ow2.carol.cmi.reference.CMIReference> getCMIReferences(java.lang.String objectName,
java.lang.String protocolName)
throws org.ow2.carol.cmi.reference.ObjectNotFoundException
getCMIReferences in interface org.ow2.carol.cmi.controller.common.ClusterViewManagerobjectName - a name of objectprotocolName - a name of protocol
org.ow2.carol.cmi.reference.ObjectNotFoundException - if none object has the given name for the given protocol
public java.util.List<org.ow2.carol.cmi.reference.CMIReference> getCMIReferences(java.lang.String objectName)
throws org.ow2.carol.cmi.reference.ObjectNotFoundException
getCMIReferences in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerobjectName - a name of object
org.ow2.carol.cmi.reference.ObjectNotFoundException - if no object is bound with the given nameprotected void addCMIReference(org.ow2.carol.cmi.reference.CMIReference cmiReference)
addCMIReference in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagercmiReference - a reference on an instancepublic void removeCMIReference(org.ow2.carol.cmi.reference.CMIReference cmiReference)
removeCMIReference in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagercmiReference - a reference on a clustered objectpublic java.util.Set<java.lang.String> getClusterNames()
getClusterNames in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerpublic java.util.Set<java.lang.String> getObjectNames(java.lang.String clusterName)
getObjectNames in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerclusterName - a name of cluster
public java.util.Set<java.lang.String> getObjectNames()
getObjectNames in interface org.ow2.carol.cmi.controller.common.ClusterViewManagergetObjectNames in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerpublic int getDelayToRefresh()
getDelayToRefresh in interface org.ow2.carol.cmi.controller.common.ClusterViewManagerpublic void setDelayToRefresh(int delay)
setDelayToRefresh in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerdelay - the time between each update of the cluster view by clientspublic boolean isPoolToEmpty(java.lang.String objectName)
isPoolToEmpty in interface org.ow2.carol.cmi.controller.common.ClusterViewManagerobjectName - a name of object
public void addPoolToEmpty(java.lang.String objectName)
addPoolToEmpty in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerobjectName - a name of objectpublic void removePoolToEmpty(java.lang.String objectName)
removePoolToEmpty in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerobjectName - a name of objectpublic boolean isServerBlackListed(org.ow2.carol.cmi.reference.ServerRef serverRef)
isServerBlackListed in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerserverRef - a reference on a server
public void addServerToBlackList(org.ow2.carol.cmi.reference.ServerRef serverRef)
addServerToBlackList in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerserverRef - a reference on a serverpublic void removeServerFromBlackList(org.ow2.carol.cmi.reference.ServerRef serverRef)
removeServerFromBlackList in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerserverRef - a reference on a server
public int getLoadFactor(org.ow2.carol.cmi.reference.ServerRef serverRef)
throws org.ow2.carol.cmi.reference.ServerNotFoundException
getLoadFactor in interface org.ow2.carol.cmi.controller.common.ClusterViewManagerserverRef - a reference on a server
org.ow2.carol.cmi.reference.ServerNotFoundException - if none server has the given address
public void setLoadFactor(org.ow2.carol.cmi.reference.ServerRef serverRef,
int loadFactor)
setLoadFactor in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerserverRef - a reference on a serverloadFactor - the load-factor for the server with the given addressprotected void initStats()
initStats in class org.ow2.carol.cmi.controller.server.AbsServerClusterViewManagerpublic int getNbClientsConnectedToProvider()
getNbClientsConnectedToProvider in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManagerpublic void registerClient(java.util.UUID uuid)
registerClient in interface org.ow2.carol.cmi.controller.server.ServerClusterViewManageruuid - the Universally Unique Identifier of the client
public void nodeAdded(java.lang.String fqn,
java.io.Serializable element)
nodeAdded in interface SynchronizedDistributedTree.DistributedTreeListener
public void nodeModified(java.lang.String fqn,
java.io.Serializable oldElement,
java.io.Serializable newElement)
nodeModified in interface SynchronizedDistributedTree.DistributedTreeListenerpublic void nodeRemoved(java.lang.String fqn)
nodeRemoved in interface SynchronizedDistributedTree.DistributedTreeListener
public void viewChange(java.util.Vector<org.jgroups.Address> newMbrs,
java.util.Vector<org.jgroups.Address> oldMbrs)
viewChange in interface SynchronizedDistributedTree.ViewListenerpublic void channelClosed(org.jgroups.Channel arg0)
channelClosed in interface org.jgroups.ChannelListenerpublic void channelConnected(org.jgroups.Channel arg0)
channelConnected in interface org.jgroups.ChannelListenerpublic void channelDisconnected(org.jgroups.Channel arg0)
channelDisconnected in interface org.jgroups.ChannelListenerpublic void channelReconnected(org.jgroups.Address arg0)
channelReconnected in interface org.jgroups.ChannelListenerpublic void channelShunned()
channelShunned in interface org.jgroups.ChannelListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||