org.ow2.cmi.controller.provider
Interface ClientClusterViewProvider

All Superinterfaces:
ClusterViewProvider, java.rmi.Remote

public interface ClientClusterViewProvider
extends ClusterViewProvider, java.rmi.Remote

Interface of providers which offers cluster view to the clients.

Author:
The new CMI team
See Also:
org.ow2.cmi.client.ClientClusterViewManagerImpl

Method Summary
 byte[] getBytecode(java.lang.String binaryName)
          Returns the bytecode of the class that has the given binary name.
 java.util.Collection<CMIReference> getCMIReferences(java.lang.String objectName, java.lang.String protocolName)
          Gets the nodes list of a given object and protocol.
 IUpdatedClientConfig getConfiguration()
           
 long getDateOfConfiguration()
           
 long getDateOfProperties(java.lang.String objectName)
          Returns the date of the last properties for a given object.
 int getDelayToRefresh()
          Returns the delay to refresh the cluster view.
 ImmutableClusteredObjectInfos getImmutableInfos(java.lang.String objectName)
           
 int getLoadFactor(ServerRef serverRef)
          Returns the load-factor for the server with the given address.
 java.lang.Class<? extends IPolicy<?>> getPolicyClass(java.lang.String objectName)
          Gets the class of a given policy.
 java.lang.String getPolicyClassName(java.lang.String objectName)
          Returns the name of the class of policy for the object with the given name.
 org.ow2.util.pool.api.IPoolConfiguration getPoolConfiguration(java.lang.String objectName)
          Returns the configuration of pool of CMIReferenceable for a object with the given name.
 java.util.Map<java.lang.String,java.lang.Object> getPropertiesForPolicy(java.lang.String objectName)
          Returns the properties for the object with the given name.
 java.lang.Class<? extends IStrategy<?>> getStrategyClass(java.lang.String objectName)
          Gets a class of strategy for the object with the given name.
 java.lang.String getStrategyClassName(java.lang.String objectName)
          Returns the name of the class of strategy for the object with the given name.
 boolean isClustered(java.lang.String objectName)
          Returns true if the specified object is clustered.
 boolean isPoolToEmpty(java.lang.String objectName)
          Returns true if the pool for object with the given name should be empty.
 boolean isReplicated(java.lang.String objectName)
          Return true if the object with the given name is replicated for high-availability.
 void registerClient(java.util.UUID uuid)
          Register a new client (for statistic purposes).
 

Method Detail

getDelayToRefresh

int getDelayToRefresh()
                      throws java.rmi.RemoteException
Returns the delay to refresh the cluster view.

Returns:
the delay to refresh the cluster view
Throws:
java.rmi.RemoteException - if there are errors on the protocol

getPolicyClassName

java.lang.String getPolicyClassName(java.lang.String objectName)
                                    throws java.rmi.RemoteException,
                                           ObjectNotFoundException
Returns the name of the class of policy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the name of the class of policy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getPolicyClass

java.lang.Class<? extends IPolicy<?>> getPolicyClass(java.lang.String objectName)
                                                     throws java.rmi.RemoteException,
                                                            ObjectNotFoundException,
                                                            ClusterViewManagerException
Gets the class of a given policy.

Parameters:
objectName - a name of object
Returns:
The corresponding policy class
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name
ClusterViewManagerException

getStrategyClassName

java.lang.String getStrategyClassName(java.lang.String objectName)
                                      throws java.rmi.RemoteException,
                                             ObjectNotFoundException
Returns the name of the class of strategy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the name of the class of strategy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getStrategyClass

java.lang.Class<? extends IStrategy<?>> getStrategyClass(java.lang.String objectName)
                                                         throws java.rmi.RemoteException,
                                                                ObjectNotFoundException,
                                                                ClusterViewManagerException
Gets a class of strategy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
a class of strategy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name
ClusterViewManagerException

getDateOfProperties

long getDateOfProperties(java.lang.String objectName)
                         throws java.rmi.RemoteException,
                                ObjectNotFoundException
Returns the date of the last properties for a given object.

Parameters:
objectName - a name of object
Returns:
date of the last properties for a given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getPropertiesForPolicy

java.util.Map<java.lang.String,java.lang.Object> getPropertiesForPolicy(java.lang.String objectName)
                                                                        throws java.rmi.RemoteException,
                                                                               ObjectNotFoundException
Returns the properties for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the properties for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getCMIReferences

java.util.Collection<CMIReference> getCMIReferences(java.lang.String objectName,
                                                    java.lang.String protocolName)
                                                    throws java.rmi.RemoteException,
                                                           ObjectNotFoundException
Gets the nodes list of a given object and protocol.

Parameters:
objectName - The name of object
protocolName - The protocol of the client
Returns:
The nodes list of the given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getBytecode

byte[] getBytecode(java.lang.String binaryName)
                   throws java.rmi.RemoteException,
                          ClientClusterViewProviderException
Returns the bytecode of the class that has the given binary name.

Parameters:
binaryName - a binary name of a class
Returns:
the bytecode of the class that has the given binary name
Throws:
java.rmi.RemoteException - if the connection failed
ClientClusterViewProviderException - if an I/O exception happens on server over the reading of the bytecode

getPoolConfiguration

org.ow2.util.pool.api.IPoolConfiguration getPoolConfiguration(java.lang.String objectName)
                                                              throws java.rmi.RemoteException,
                                                                     ObjectNotFoundException
Returns the configuration of pool of CMIReferenceable for a object with the given name.

Parameters:
objectName - a name of object
Returns:
the configuration of pool of CMIReferenceable for a object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

isPoolToEmpty

boolean isPoolToEmpty(java.lang.String objectName)
                      throws java.rmi.RemoteException,
                             ObjectNotFoundException
Returns true if the pool for object with the given name should be empty.

Parameters:
objectName - a name of object
Returns:
true if the pool for object with the given name should be empty
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getLoadFactor

int getLoadFactor(ServerRef serverRef)
                  throws java.rmi.RemoteException,
                         ServerNotFoundException
Returns the load-factor for the server with the given address.

Parameters:
serverRef - a reference on a server
Returns:
the load-factor for the server with the given address
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ServerNotFoundException - if none server has the given address

registerClient

void registerClient(java.util.UUID uuid)
                    throws java.rmi.RemoteException
Register a new client (for statistic purposes).

Parameters:
uuid - the Universally Unique Identifier of the client
Throws:
java.rmi.RemoteException - if there are errors on the protocol

isReplicated

boolean isReplicated(java.lang.String objectName)
                     throws java.rmi.RemoteException,
                            ObjectNotFoundException
Return true if the object with the given name is replicated for high-availability.

Parameters:
objectName - a name of object
Returns:
true if the object with the given name is replicated for high-availability
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getImmutableInfos

ImmutableClusteredObjectInfos getImmutableInfos(java.lang.String objectName)
                                                throws java.rmi.RemoteException,
                                                       ObjectNotFoundException
Throws:
java.rmi.RemoteException
ObjectNotFoundException

getConfiguration

IUpdatedClientConfig getConfiguration()
                                      throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getDateOfConfiguration

long getDateOfConfiguration()
                            throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

isClustered

boolean isClustered(java.lang.String objectName)
                    throws java.rmi.RemoteException
Returns true if the specified object is clustered.

Parameters:
name - a name of object
Returns:
true if the specified object is clustered
Throws:
java.rmi.RemoteException - if there are errors on the protocol


Copyright © 2009 OW2 Consortium. All Rights Reserved.