org.objectweb.carol.cmi
Class DistributedEquiv

java.lang.Object
  extended by org.objectweb.carol.cmi.DistributedEquiv

public final class DistributedEquiv
extends java.lang.Object

Manage equivalences between objects in the cluster. Two objects are equivalent if their keys have the same value (key1.equals(key2)). The keys prefixed with "REG_" are reserved by the RegistryImpl. No other module should generate such keys.

Author:
Simon Nieuviarts

Field Summary
static java.lang.String CL_PREFIX
          Distributed Equivalent System
 
Constructor Summary
DistributedEquiv()
           
 
Method Summary
static java.rmi.Remote getExportedStubList(java.rmi.Remote obj)
           
static java.lang.ClassLoader getLocalCLByKey(java.io.Serializable key)
          Get the local class loader associated with the key - is only set if the remote object was bound locally
static ObjectIdFactory getOidFactory()
           
static void putLocalCLByKey(java.io.Serializable key, java.lang.ClassLoader cl)
          Put the local class loader associated with the key in the classloader cache
static void removeLocalCLByKey(java.io.Serializable key)
          Remove the entry associated with the key in the local class loader cache
static DistributedEquiv start()
          The first one which calls this method starts the DistributedEquiv system.
 void stop()
          Terminate the Distributed Equivalent System
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CL_PREFIX

public static final java.lang.String CL_PREFIX
Distributed Equivalent System

See Also:
Constant Field Values
Constructor Detail

DistributedEquiv

public DistributedEquiv()
Method Detail

start

public static DistributedEquiv start()
                              throws ServerConfigException
The first one which calls this method starts the DistributedEquiv system. It can be the only one to stop it with the ref it gets.

Returns:
Distributed Equivalent System
Throws:
ServerConfigException - if exception is encountered

stop

public void stop()
          throws ServerConfigException
Terminate the Distributed Equivalent System

Throws:
ServerConfigException - if error during stopping

getExportedStubList

public static java.rmi.Remote getExportedStubList(java.rmi.Remote obj)
                                           throws java.rmi.NoSuchObjectException
Parameters:
obj - Remote object
Returns:
the exported stub object
Throws:
java.rmi.NoSuchObjectException - if the object is not currently exported

getLocalCLByKey

public static java.lang.ClassLoader getLocalCLByKey(java.io.Serializable key)
                                             throws ServerConfigException
Get the local class loader associated with the key - is only set if the remote object was bound locally

Parameters:
key - key
Returns:
null if not found.
Throws:
ServerConfigException - if des is null

putLocalCLByKey

public static void putLocalCLByKey(java.io.Serializable key,
                                   java.lang.ClassLoader cl)
                            throws ServerConfigException
Put the local class loader associated with the key in the classloader cache

Parameters:
key - key
cl - ClassLoader
Throws:
ServerConfigException - if des is null

removeLocalCLByKey

public static void removeLocalCLByKey(java.io.Serializable key)
                               throws ServerConfigException
Remove the entry associated with the key in the local class loader cache

Parameters:
key - key
Throws:
ServerConfigException - if des is null

getOidFactory

public static ObjectIdFactory getOidFactory()
                                     throws ServerConfigException
Throws:
ServerConfigException