org.objectweb.carol.cmi
Class ClusterIdFactory

java.lang.Object
  extended byorg.objectweb.carol.cmi.ClusterIdFactory

public class ClusterIdFactory
extends java.lang.Object

The aim of this class is to generate unique IDs to identify an instance of a clustered server. The IDs generated by this class are guaranteed to be unique on the whole network. Several methods may be provided. To generate an ID, time may be needed, because they can be generated by locking a well know resource for a period of time.

Author:
Simon Nieuviarts

Method Summary
static ClusterId getLocalId()
          Return the local cluster Id.
static void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public static void start()
                  throws ClusterException
Throws:
ClusterException

getLocalId

public static ClusterId getLocalId()
                            throws ClusterException
Return the local cluster Id. Is null if generate() has not been called before.

Returns:
the cluster Id
Throws:
ClusterException