|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cluster
The Cluster interface represents a collection of services that operate in a clustered network environment.
Method Summary | |
---|---|
Service |
ensureService(String sName,
String sType)
Obtains a Service object for the specified service name and type. |
String |
getClusterName()
Determine the configured name for the Cluster. |
Member |
getLocalMember()
Returns a Member object representing the local (i.e. |
Registry |
getManagement()
Returns the current management registry. |
Set |
getMemberSet()
Returns a Set of Member objects, one for each Member of the cluster. |
Member |
getOldestMember()
Returns a Member object representing the senior cluster member. |
Service |
getService(String sName)
Returns a Service object for the specified service name. |
ServiceInfo |
getServiceInfo(String sName)
Returns a ServiceInfo object for the specified service name. |
Enumeration |
getServiceNames()
Returns an Enumeration of String objects, one for each service that has been previously registered in the cluster. |
long |
getTimeMillis()
Returns the current "cluster time", which is analogous to the System.currentTimeMillis() except that the cluster
time is the roughly the same for all Members in the cluster. |
void |
setManagement(Registry registry)
Sets the current management registry. |
Methods inherited from interface com.tangosol.util.Controllable |
---|
configure, getContextClassLoader, isRunning, setContextClassLoader, shutdown, start, stop |
Method Detail |
---|
Enumeration getServiceNames()
For each name, a call to getServiceInfo(String)
will return
a ServiceInfo describing a service. However, the call to
getService(String)
may return null if that service is not
available locally.
IllegalStateException
- thrown if the cluster service
is not running or has stoppedServiceInfo getServiceInfo(String sName)
sName
- the service name, within the cluster, that uniquely
identifies a registered service
IllegalStateException
- thrown if the cluster service
is not running or has stoppedgetService(String)
Service getService(String sName)
sName
- the service name, within the cluster, that uniquely
identifies a service
IllegalStateException
- thrown if the cluster service
is not running or has stoppedgetServiceInfo(String)
,
ensureService(String, String)
Service ensureService(String sName, String sType)
If the service with the specified name already exists, a reference to the same service will be returned. Otherwise a new service object will be instantiated and returned. The service's context ClassLoader will be initialized with the Cluster's context ClassLoader.
It is essential to understand that until the service is started using
Controllable.start()
, the cluster doesn't keep a reference to
that service instance. Therefore, the external synchronization on the
cluster object is necessary to prevent creation of a duplicate service.
sName
- the service name, within the cluster, that uniquely
identifies a servicesType
- the service type, that serves as a key to the cluster
configuration info, allowing the cluster instantiate
the corresponding service implementations if the
specified service is not available locally
IllegalStateException
- thrown if the cluster service
is not running or has stopped
IllegalArgumentException
- thrown if the type is illegal or
unknownSet getMemberSet()
IllegalStateException
- thrown if the cluster service
is not running or has stoppedMember getLocalMember()
IllegalStateException
- thrown if the cluster service
is not running or has stoppedlong getTimeMillis()
System.currentTimeMillis()
except that the cluster
time is the roughly the same for all Members in the cluster.
IllegalStateException
- thrown if the cluster service
is not running or has stoppedMember getOldestMember()
IllegalStateException
- thrown if the cluster service
is not running or has stoppedRegistry getManagement()
void setManagement(Registry registry)
registry
- the management registry to use on this nodeString getClusterName()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |