|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xl2.odb.XL2Reference
Persistent reference.
Parents and Referents
A parent is a first class object. Objects embedded within the serialized graph of a first class object are second class objects. XL2References only point to first class objects and are only constructed with first class parents.
XL2Transaction
, Serialized FormConstructor Summary | |
XL2Reference()
|
|
XL2Reference(int meaningless)
Constructs an XL2Reference with itself as the parent such that changing the ref will lock itself with the current XL2Transaction. |
|
XL2Reference(java.lang.Object parent)
Constructs an XL2Reference with the specified parent. |
Method Summary | |
java.lang.Object |
get()
Returns the referent. |
void |
readExternal(java.io.ObjectInput in)
For serialization, not for applications. |
void |
set(java.lang.Object obj)
Changes the referent. |
void |
writeExternal(java.io.ObjectOutput out)
For serialization, not for applications. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XL2Reference()
public XL2Reference(int meaningless)
meaningless
- Has no meaning.XL2Reference(Object)
public XL2Reference(java.lang.Object parent) throws InvalidObjectException, LockNotGrantedException
XL2Exception
- When the calling thread is not joined
to a transaction.InvalidObjectException
- When the parent was previously locked by a
transaction that was aborted.LockNotGrantedException
- When the parent has a conflicting lock
with another transaction.XL2Transaction
Method Detail |
public java.lang.Object get()
XL2Exception
- If no transaction is in progress.public void readExternal(java.io.ObjectInput in) throws java.lang.ClassNotFoundException, java.io.IOException
readExternal
in interface java.io.Externalizable
Externalizable
public void set(java.lang.Object obj) throws InvalidObjectException, LockNotGrantedException
obj
- The new referent.XL2Exception
- When the current thread is not
joined to a transaction.InvalidObjectException
- If the object was previously locked by a
transaction that was aborted.LockNotGrantedException
- When either the parent or referent is
locked by another transaction.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
Externalizable
|
Home | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |