|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--br.shob.SharedObject
This class defines the Serializable objects that actually travel the global space, are cached in each machine, etc.
Each instance contains information about validity, leases, content class, etc. Is handled entirely by the SharedSpace and doesn't deserve much attention unless you are developing Shob.
Field Summary | |
static long |
defaultLeaseTime
Default lease time for objects without one. |
Constructor Summary | |
SharedObject(String globalName,
Serializable data)
Constructor for the SharedObject object |
|
SharedObject(String globalName,
Serializable data,
String referenceClassName)
Constructor for the SharedObject object |
Method Summary | |
boolean |
canWrite()
Returns true if the SharedSpace has acquired the writing lock for this object |
ClassLoader |
getClassLoader()
Gets the classLoader attribute of the SharedObject object |
protected Serializable |
getData()
Gets the data attribute of the SharedObject object |
SharedObjectDescriptor |
getDescriptor()
Gets the descriptor attribute of the SharedObject object |
String |
getGlobalName()
Gets the globalName attribute of the SharedObject object |
long |
getLeaseTime()
Gets the leaseTime attribute of the SharedObject object |
String |
getReferenceClassName()
Gets the name of the reference's class (or interface). |
TimeStamp |
getTimeStamp()
Gets the timeStamp attribute of the SharedObject object |
boolean |
isUpdated()
Checks if this object's lease has expired. |
void |
setCanWrite(boolean flag)
Sets the canWrite attribute of the SharedObject object |
void |
setLastUpdated(long time)
Sets the lastUpdated attribute of the SharedObject object |
void |
setLeaseTime(long lease)
Sets the leaseTime attribute of the SharedObject object |
void |
setLost(boolean newLostValue)
Sets that the object was lost. |
void |
setTimeStamp(TimeStamp stamp)
Sets the timeStamp attribute of the SharedObject object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static long defaultLeaseTime
Constructor Detail |
public SharedObject(String globalName, Serializable data)
globalName
- Description of the Parameterdata
- Description of the Parameterpublic SharedObject(String globalName, Serializable data, String referenceClassName)
globalName
- Description of the Parameterdata
- Description of the ParameterreferenceClassName
- Description of the ParameterMethod Detail |
public boolean canWrite()
public ClassLoader getClassLoader()
public SharedObjectDescriptor getDescriptor()
public String getGlobalName()
public long getLeaseTime()
public String getReferenceClassName()
public TimeStamp getTimeStamp()
public boolean isUpdated()
public void setCanWrite(boolean flag)
flag
- The new canWrite valuepublic void setLastUpdated(long time)
time
- The new lastUpdated valuepublic void setLeaseTime(long lease)
lease
- The new leaseTime valuepublic void setLost(boolean newLostValue)
newLostValue
- The new lost valuepublic void setTimeStamp(TimeStamp stamp)
stamp
- The new timeStamp valueprotected Serializable getData()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |