|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServerClusterViewManager
Interface for a manager of the cluster view at server-side.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ow2.cmi.controller.common.ClusterViewManager |
|---|
ClusterViewManager.State |
| Method Summary | |
|---|---|
void |
addCMIReference(CMIReference cmiReference)
Add a CMIReference to the cluster view. |
void |
addFilter(java.lang.String objectName,
IFilter filter)
Add a new filter for the given object name. |
void |
addGlobalFilter(IFilter filter)
Add a new global filter. |
java.lang.Object |
addLoadBalancingArchive(byte[] bytesOfFile,
java.lang.String location,
java.lang.Class<?>[] policies,
java.lang.Class<?>[] strategies)
Adds an archive containing load balancing classes. |
void |
addObjectInstance(ClusteredObjectInfo clusteredObjectInfo,
CMIReference cmiReference)
Adds an instance of a clustered object. |
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. |
boolean |
addProtocol(java.lang.String initialContextFactoryName,
ServerId serverRef,
javax.naming.Context cmiContext)
Adds a new protocol. |
void |
addServerToBlackList(ServerRef serverRef)
Adds a server to the blacklist. |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getAvailablePoliciesAndStrategies()
Gets available load balancing policies and strategies. |
java.util.Set<ServerId> |
getBlacklistedServers()
|
java.lang.String |
getBusinessName(java.lang.String objectName)
Returns a name of business interface of this object (for ejb2 only). |
IUpdatedClientConfig |
getClientConfig()
|
java.util.Set<java.lang.String> |
getClusterNames()
Returns the set of name of cluster. |
java.util.Collection<CMIReference> |
getCMIReferences(java.lang.String objectName)
Returns a list of CMIReference for an object with the given name. |
java.util.Collection<CMIReference> |
getCMIReferences(java.lang.String objectName,
java.lang.String protocolName,
java.util.Set<java.lang.Object> qualities)
Return a filtered list of CMIReference for an object with the given name. |
java.util.Set<CMIReference> |
getCMIRefsForServerRef(ServerRef serverRef)
|
long |
getDateOfConfiguration()
|
java.util.Set<java.lang.String> |
getDomainNames()
|
java.util.List<IFilter> |
getFilters(java.lang.String objectName)
Return the filters that are used to restrict accesses on the given object. |
java.util.List<IFilter> |
getGlobalFilters()
Return the global filters. |
ImmutableClusteredObjectInfos |
getImmutableInfos(java.lang.String objectName)
|
java.net.InetAddress |
getInetAddress()
Returns the address of the local registries. |
java.lang.String |
getItfName(java.lang.String objectName)
Returns a name of interface of this object. |
javax.management.remote.JMXServiceURL |
getJMXServiceURL(java.lang.String protocolName)
|
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.List<java.lang.String> |
getProviderURLs(java.lang.String protocolName)
Returns the list of Provider URL. |
ServerId |
getRefOnLocalRegistry(java.lang.String protocolName)
|
java.util.Set<ServerId> |
getRefsOnRegistries(java.lang.String serverName)
|
java.util.Set<java.lang.String> |
getServerNames(java.lang.String domainName)
|
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<ServerId> |
getServerRefs(java.lang.String protocolName)
|
boolean |
hasProtocol(java.lang.String protocolName)
|
boolean |
isRegistrationOpened()
|
boolean |
isReplicationManagerStarted()
|
boolean |
isServerBlackListed(ServerRef serverRef)
Returns true the server with the given reference if blacklisted. |
void |
registerClient(java.util.UUID uuid)
Register a new client. |
void |
removeCMIReference(CMIReference cmiReference)
Removes a CMIReference from the cluster view. |
boolean |
removeFilter(java.lang.String objectName,
IFilter filter)
Remove a filter for the given object name. |
void |
removeGlobalFilter(IFilter filter)
Remove a global filter. |
void |
removeLoadBalancingArchive(java.lang.Object archiveId,
java.lang.String[] policies,
java.lang.String[] strategies,
boolean isArchiveOwner)
Remove Load Balancing Archive, previously added. |
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(ServerRef serverRef)
Removes a server to the blacklist. |
void |
setAlgorithmForPolicy(java.lang.String objectName,
java.lang.String policyClassName,
java.lang.String strategyClassName,
java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the algorithm of load-balancing for the object with the given name. |
void |
setDelayToRefresh(int delay)
Sets the time between each update of the cluster view by clients. |
void |
setLoadFactor(ServerRef serverRef,
int loadFactor)
Sets the load-factor for the server with the given address. |
void |
setPolicyClassName(java.lang.String objectName,
java.lang.String policyClassName)
Sets a new policy for a given object. |
void |
setPoolConfiguration(java.lang.String objectName,
org.ow2.util.pool.api.IPoolConfiguration poolConfiguration)
Set the configuration of pool of CMIReferenceable for a object with the given name. |
void |
setPropertiesForPolicy(java.lang.String objectName,
java.util.Map<java.lang.String,java.lang.Object> properties)
Sets properties for a given object. |
void |
setPropertyForPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.lang.Object propertyValue)
Sets a property for a given object. |
void |
setReplicationManagerStarted(boolean replicationManagerStarted)
Set if the replication manager is started. |
void |
setStaticPropertyForPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.lang.Object propertyValue)
Sets a property on policy class of a given object(not object instance). |
void |
setStrategyClassName(java.lang.String objectName,
java.lang.String strategyClassName)
Sets a new policy for a given object. |
| Methods inherited from interface org.ow2.cmi.controller.common.ClusterViewManager |
|---|
addObjectToWatch, destroy, getApplicationExceptionNames, getClusterName, getCMIReferences, getConfig, getDateOfProperties, getDelayToRefresh, getEventDispatcher, getInitialContextFactoryName, getInterface, getLoadFactor, getPolicy, getPolicyClass, getPolicyClassName, getPool, getPoolConfiguration, getPropertiesForPolicy, getPropertyForPolicy, getProtocols, getRemoteClass, getSessionId, getState, getStrategyClass, getStrategyClassName, getUUID, hasState, isClustered, isPoolToEmpty, isProxyEnabled, isReplicated, setPool, start, stop |
| Methods inherited from interface org.ow2.cmi.event.CMIManagedObject |
|---|
getCMIManagedObjectId, getComponent |
| Methods inherited from interface org.ow2.cmi.smart.api.SmartConnector |
|---|
getInitialContextFactoryName |
| Method Detail |
|---|
void setPolicyClassName(java.lang.String objectName,
java.lang.String policyClassName)
throws ObjectNotFoundException
objectName - a name of objectpolicyClassName - a name of class of policy
ObjectNotFoundException - if no object is bound with the given name
void setStrategyClassName(java.lang.String objectName,
java.lang.String strategyClassName)
throws ObjectNotFoundException
objectName - a name of objectstrategyClassName - a name of class of strategy
ObjectNotFoundException - if no object is bound with the given name
void setPropertiesForPolicy(java.lang.String objectName,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws ObjectNotFoundException
objectName - a name of objectproperties - properties for the LB policy of the given object
ObjectNotFoundException - if the specified object doesn't exist
void setPropertyForPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.lang.Object propertyValue)
throws ObjectNotFoundException
objectName - a name of objectpropertyName - a name of property for the policy of the given objectpropertyValue - a value for the given name of property
ObjectNotFoundException - if the specified object doesn't exist
void setAlgorithmForPolicy(java.lang.String objectName,
java.lang.String policyClassName,
java.lang.String strategyClassName,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws ObjectNotFoundException
objectName - a name of objectpolicyClassName - a name of class of policystrategyClassName - a name of class of strategyproperties - a set of properties
ObjectNotFoundException - if none object has the given name
java.util.Collection<CMIReference> getCMIReferences(java.lang.String objectName)
throws ObjectNotFoundException
objectName - a name of object
ObjectNotFoundException - if no object is bound with the given name
java.util.Collection<CMIReference> getCMIReferences(java.lang.String objectName,
java.lang.String protocolName,
java.util.Set<java.lang.Object> qualities)
throws ObjectNotFoundException
objectName - an object nameprotocolName - a protocol namequalities - qualities to get associated filters. If null, no filter is applied
ObjectNotFoundException - if no object is bound with the given namevoid addCMIReference(CMIReference cmiReference)
cmiReference - a reference on a clustered objectvoid removeCMIReference(CMIReference cmiReference)
cmiReference - a reference on a clustered objectjava.util.Set<java.lang.String> getClusterNames()
java.util.Set<java.lang.String> getObjectNames()
getObjectNames in interface ClusterViewManagerjava.util.Set<java.lang.String> getObjectNames(java.lang.String clusterName)
clusterName - a name of cluster
void addObjectInstance(ClusteredObjectInfo clusteredObjectInfo,
CMIReference cmiReference)
throws ServerClusterViewManagerException
clusteredObjectInfo - informations on a clustered objectcmiReference - reference on a clustered object
ServerClusterViewManagerException - if the object cannot be added to the cluster.
java.lang.String getItfName(java.lang.String objectName)
throws ObjectNotFoundException
objectName - a name of object
ObjectNotFoundException - if no object is bound with the given name
java.lang.String getBusinessName(java.lang.String objectName)
throws ObjectNotFoundException
objectName - a name of object
ObjectNotFoundException - if no object is bound with the given name
java.util.List<java.lang.String> getProviderURLs(java.lang.String protocolName)
throws ServerClusterViewManagerException
getProviderURLs in interface SmartConnectorprotocolName - a name of protocol
ServerClusterViewManagerException - if none provider exists for the protocol with the given name
boolean addProtocol(java.lang.String initialContextFactoryName,
ServerId serverRef,
javax.naming.Context cmiContext)
throws ServerClusterViewManagerException
initialContextFactoryName - a InitialContextFactory for this protocolserverRef - a reference onto the local registrycmiContext - a instance of CMIContext to bind a provider of the cluster view for clients
and a dummy context
ServerClusterViewManagerException - if the protocol cannot be addedboolean hasProtocol(java.lang.String protocolName)
protocolName - a protocol name
java.net.InetAddress getInetAddress()
void setDelayToRefresh(int delay)
delay - the time between each update of the cluster view by clients
void setPoolConfiguration(java.lang.String objectName,
org.ow2.util.pool.api.IPoolConfiguration poolConfiguration)
throws ObjectNotFoundException
objectName - a name of objectpoolConfiguration - the configuration of pool of CMIReferenceable for a object with the given name
ObjectNotFoundException - if none object has the given namevoid removePoolToEmpty(java.lang.String objectName)
objectName - a name of objectvoid addPoolToEmpty(java.lang.String objectName)
objectName - a name of objectboolean isServerBlackListed(ServerRef serverRef)
serverRef - a reference on a server
void addServerToBlackList(ServerRef serverRef)
serverRef - a reference on a servervoid removeServerFromBlackList(ServerRef serverRef)
serverRef - a reference on a server
void setLoadFactor(ServerRef serverRef,
int loadFactor)
serverRef - a reference on a serverloadFactor - the load-factor for the server with the given address
javax.management.remote.JMXServiceURL getJMXServiceURL(java.lang.String protocolName)
throws ProtocolNotFoundException
protocolName - a name of protocol
ProtocolNotFoundException - if none protocol have a such name
ServerId getRefOnLocalRegistry(java.lang.String protocolName)
throws ProtocolNotFoundException
protocolName - a name of protocol
ProtocolNotFoundException - if none protocol have a such name
java.util.Set<ServerId> getServerRefs(java.lang.String protocolName)
throws ProtocolNotFoundException
protocolName - a name of protocol
ProtocolNotFoundException - if none protocol have a such namejava.util.Set<ServerId> getRefsOnRegistries(java.lang.String serverName)
serverName - a server name
java.util.Set<java.lang.String> getServerObjectForProtocol(java.lang.String serverUrl,
java.lang.String protocolName)
throws ProtocolNotFoundException
serverUrl - a server referenceprotocolName - a given protocol
ProtocolNotFoundException - if none protocol have a such nameint getNbClientsConnectedToProvider()
void registerClient(java.util.UUID uuid)
uuid - the Universally Unique Identifier of the clientboolean isReplicationManagerStarted()
void setReplicationManagerStarted(boolean replicationManagerStarted)
replicationManagerStarted - true if the replication manager is startedjava.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAvailablePoliciesAndStrategies()
java.util.Set<java.lang.String> getDomainNames()
java.util.Set<java.lang.String> getServerNames(java.lang.String domainName)
domainName - domain name
java.util.Set<ServerId> getBlacklistedServers()
java.util.Set<CMIReference> getCMIRefsForServerRef(ServerRef serverRef)
serverRef - a reference on CMI server
java.lang.Object addLoadBalancingArchive(byte[] bytesOfFile,
java.lang.String location,
java.lang.Class<?>[] policies,
java.lang.Class<?>[] strategies)
bytesOfFile - Bytes content of the filelocation - File locationstrategies - Load balancing policiespolicies - Load balancing strategies
PolicyStrategyManager to register the new archive.
void removeLoadBalancingArchive(java.lang.Object archiveId,
java.lang.String[] policies,
java.lang.String[] strategies,
boolean isArchiveOwner)
throws java.lang.Exception
archiveId - The Id of the archive.policies - names of the policies to removestrategies - names of the policies to removeisArchiveOwner - if true then the call is performed by the archive owner.
The archive owner is the first server that deployed the archive.
java.lang.Exception - Any.java.util.List<IFilter> getGlobalFilters()
void addGlobalFilter(IFilter filter)
throws java.lang.IllegalArgumentException
filter - a global filter
java.lang.IllegalArgumentException - if the provided filter is not serializablevoid removeGlobalFilter(IFilter filter)
filter - a global filter
java.util.List<IFilter> getFilters(java.lang.String objectName)
throws ObjectNotFoundException
objectName - an object name
ObjectNotFoundException - if none object has the given name
void addFilter(java.lang.String objectName,
IFilter filter)
throws java.lang.IllegalArgumentException,
ObjectNotFoundException
objectName - an object namefilter - a filter to add
java.lang.IllegalArgumentException - if the provided filter is not serializable
ObjectNotFoundException - if none object has the given name
boolean removeFilter(java.lang.String objectName,
IFilter filter)
throws ObjectNotFoundException
objectName - an object namefilter - a filter to remove
ObjectNotFoundException - if none object has the given nameIUpdatedClientConfig getClientConfig()
ImmutableClusteredObjectInfos getImmutableInfos(java.lang.String objectName)
throws ObjectNotFoundException
ObjectNotFoundExceptionlong getDateOfConfiguration()
boolean isRegistrationOpened()
void setStaticPropertyForPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.lang.Object propertyValue)
throws ObjectNotFoundException,
java.lang.RuntimeException
objectName - a name of objectpropertyName - a name of propertypropertyValue - a value for the given name of property
ObjectNotFoundException - if the used manager is at client-side
java.lang.RuntimeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||