|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--br.shob.DefaultSharedReference | +--br.shob.PhantomReference
A PhantomReference is a special reference that contains an old entry and does not:
It is used primarily by StorageEnvents
who need to inform what value has been replaced.
When methods that would require a live reference are called on a PhantomReference, a PhantomCallException is thrown and no work is done. Such methods are BeginTrans, Commit, Rollback, etc.
Field Summary |
Fields inherited from interface br.shob.SharedReference |
defaultLeaseTime |
Constructor Summary | |
PhantomReference(String globalName,
Serializable obj)
Constructor for the PhantomReference object. |
|
PhantomReference(String globalName,
SharedSpace shob,
Serializable obj)
Constructor for the PhantomReference object |
Method Summary | |
Object |
getData()
Gets the data attribute of the PhantomReference object |
void |
srBeginTrans()
This method throws a PhantomCallException and
should not be called. |
void |
srCommit()
This method throws a PhantomCallException and
should not be called. |
boolean |
srIsUpdated()
This method always returns true. |
void |
srRollback()
This method throws a PhantomCallException and
should not be called. |
void |
srUnshare()
This method throws a PhantomCallException and
should not be called. |
void |
srValidate()
This method throws a PhantomCallException and
should not be called. |
Methods inherited from class br.shob.DefaultSharedReference |
equals, hashCode, srAddStorageListener, srCallMethod, srEquals, srEquals, srGetGlobalName, srRemoveStorageListener, srToString, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PhantomReference(String globalName, SharedSpace shob, Serializable obj)
globalName
- the global name of the object referencedshob
- the shared space who can find the objectobj
- the old value of the shared objectpublic PhantomReference(String globalName, Serializable obj)
globalName
- Description of the Parameterobj
- Description of the ParameterMethod Detail |
public Object getData()
getData
in class DefaultSharedReference
public void srBeginTrans() throws ShobException, AlreadyLockedException
PhantomCallException
and
should not be called.
srBeginTrans
in interface SharedReference
srBeginTrans
in class DefaultSharedReference
ShobException
- Description of the Exception
AlreadyLockedException
- Description of the Exceptionpublic void srCommit() throws ShobException, NotLockedException
PhantomCallException
and
should not be called.
srCommit
in interface SharedReference
srCommit
in class DefaultSharedReference
ShobException
- Description of the Exception
NotLockedException
- Description of the Exceptionpublic boolean srIsUpdated()
srIsUpdated
in interface SharedReference
srIsUpdated
in class DefaultSharedReference
public void srRollback() throws ShobException, NotLockedException
PhantomCallException
and
should not be called.
srRollback
in interface SharedReference
srRollback
in class DefaultSharedReference
ShobException
- Description of the Exception
NotLockedException
- Description of the Exceptionpublic void srUnshare() throws ShobException
PhantomCallException
and
should not be called.
srUnshare
in interface SharedReference
srUnshare
in class DefaultSharedReference
ShobException
- Description of the Exceptionpublic void srValidate() throws ShobException
PhantomCallException
and
should not be called.
srValidate
in interface SharedReference
srValidate
in class DefaultSharedReference
ShobException
- Description of the Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |