|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.carol.cmi.ClusterStubData
Stubs to clustered objects extend this class. They may contain several stubs to regular objects.
Constructor Summary | |
ClusterStubData(ClusterId serverId,
java.rmi.Remote stub,
int factor)
Construct a new cluster stub, containing a regular stub. |
|
ClusterStubData(java.rmi.Remote stub)
This must be called only for stubs without server id and load factor. |
Method Summary | |
void |
debug(java.lang.String mesg)
|
ClusterConfig |
getClusterConfig()
You can safely assume it returns a non null structure if it is not a stub to a cluster registry. cfg should have been initialized by the constructor |
ClusterStub |
getClusterStub()
|
StubLB |
getRandom()
|
StubLB |
getRoundRobin()
|
boolean |
isStubDebug()
|
boolean |
isValidRemote(java.rmi.Remote r)
|
static ClusterStubData |
read(java.io.ObjectInput in,
ClusterStub cs)
Deserialize a ClusterStubData. |
boolean |
removeStub(ClusterId serverId)
This function fails if and only if the stub to remove is the last one. |
boolean |
removeStub(java.rmi.Remote stub)
This function fails if and only if the stub to remove is the last one. |
void |
setClusterConfig(ClusterConfig cfg)
|
boolean |
setStub(ClusterId serverId,
java.rmi.Remote stub,
int factor)
Add a regular stub in this cluster stub. |
boolean |
setStub(java.rmi.Remote stub)
Add a regular stub in this cluster stub. |
void |
write(java.io.ObjectOutput out)
Serialize this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClusterStubData(ClusterId serverId, java.rmi.Remote stub, int factor) throws java.rmi.RemoteException
serverId
- the cluster id of the server where the remote object is
running.stub
- the regular stub.public ClusterStubData(java.rmi.Remote stub) throws java.rmi.RemoteException
stub
- a stub to the registry.Method Detail |
public ClusterStub getClusterStub() throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean isValidRemote(java.rmi.Remote r)
public boolean setStub(ClusterId serverId, java.rmi.Remote stub, int factor)
serverId
- the cluster id of the server where the remote object
is running.stub
- the regular stub.
public boolean setStub(java.rmi.Remote stub)
stub
- a stub to a registry.
public void write(java.io.ObjectOutput out) throws java.io.IOException
out
- the output stream
java.io.IOException
public static ClusterStubData read(java.io.ObjectInput in, ClusterStub cs) throws java.io.IOException, java.lang.ClassNotFoundException
in
- input stream
java.io.IOException
java.lang.ClassNotFoundException
public boolean removeStub(ClusterId serverId)
public boolean removeStub(java.rmi.Remote stub)
public void setClusterConfig(ClusterConfig cfg)
public ClusterConfig getClusterConfig()
public StubLB getRoundRobin()
public StubLB getRandom()
public boolean isStubDebug()
public void debug(java.lang.String mesg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |