public class ServerStubList
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
debug(java.lang.String mesg)
Print a debug message on the console
|
static ClusterStub |
deserialize(byte[] serialized)
Deserialize a byte array to create a cluster stub
|
java.lang.String |
getKey() |
byte[] |
getSerialized() |
java.util.Set |
getSetOfStubs()
Get the set of stubs (synchronized)
|
StubData |
getStub(ClusterId serverId)
Get the stub associated with the serverId (Synchronized)
|
boolean |
isStubDebug()
Test is debug mode is enabled
|
static ClusterStub |
read(java.io.ObjectInput in)
Read the input and builds a server stubs list
|
void |
removeStub(ClusterId serverId)
Remove a stub in the clustered stub (Synchronized)
|
void |
removeStub(StubData sd)
Remove a stub in the clustered stub (Synchronized)
|
void |
setKey(java.lang.String key)
Set the key
|
java.lang.String |
toContentsString()
Convert the stubs list to a readable string
|
java.lang.String |
toString() |
void |
write(java.io.ObjectOutput out)
Write the server stubs list
|
public byte[] getSerialized() throws java.io.IOException
java.io.IOException
- if an exception occurspublic void write(java.io.ObjectOutput out) throws java.io.IOException
out
- outputjava.io.IOException
- if an I/O error occurspublic static ClusterStub read(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- inputjava.io.IOException
- if an I/O error occursjava.lang.ClassNotFoundException
- if the expected class can not be createdpublic static ClusterStub deserialize(byte[] serialized) throws java.io.IOException, java.lang.ClassNotFoundException
serialized
- but to deserializejava.io.IOException
- if an I/O error occursjava.lang.ClassNotFoundException
- if the expected class can not be instanciatedpublic StubData getStub(ClusterId serverId)
serverId
- stub identifier to getpublic void removeStub(ClusterId serverId)
serverId
- stub identifier to removepublic void removeStub(StubData sd)
sd
- stub datapublic java.util.Set getSetOfStubs()
public boolean isStubDebug()
public static void debug(java.lang.String mesg)
mesg
- messagepublic java.lang.String toContentsString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getKey()
public void setKey(java.lang.String key)
key
- jndi name associated with the object