|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.lang.Object._Impl
public static class Object._Impl
_Impl objects hold the actual code and data of Fabric objects and may be evicted from memory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface fabric.lang.Object |
---|
Object._Impl, Object._Proxy, Object._Static |
Field Summary | |
---|---|
protected Object._Proxy |
$class
A reference to the class object. |
Object._Impl |
$history
Modification log. |
boolean |
$isOwned
Whether this worker owns the most up-to-date copy of the object. |
protected Label |
$label
|
int |
$numWaiting
The number of threads waiting on this object. |
Log |
$reader
Any transaction that has logged a read of the object, or null if none. |
ReadMapEntry |
$readMapEntry
A reference to the global read list for this object. |
FabricSoftRef |
$ref
|
int |
$updateMapVersion
The version number on the last update-map that was checked. |
int |
$version
|
Log |
$writeLockHolder
The innermost transaction that is holding a write lock on the object. |
Log |
$writer
The unique running transaction that can write to the object, or null if none. |
Constructor Summary | |
---|---|
Object._Impl(Store store,
Label label)
Creates a new Fabric object that will reside on the given Store. |
|
Object._Impl(Store store,
long onum,
int version,
long expiry,
long label,
java.io.ObjectInput serializedInput,
java.util.Iterator<RefTypeEnum> refTypes,
java.util.Iterator<java.lang.Long> intraStoreRefs)
This is the deserialization constructor and reconstructs the object from its serialized state. |
Method Summary | |
---|---|
static void |
_npe(Label lbl)
A dummy method. |
void |
$copyAppStateFrom(Object._Impl other)
This copies the application state of the object. |
void |
$copyStateFrom(Object._Impl other)
This is used to restore the state of the object during transaction roll-back. |
void |
$forceRenumber(long onum)
Deprecated. |
Object._Proxy |
$getClass()
|
long |
$getOnum()
The object's onum. |
Object._Proxy |
$getProxy()
A proxy for this object. |
Store |
$getStore()
The store where the object resides. |
int |
$getVersion()
|
protected Object._Proxy |
$makeProxy()
Subclasses should override this method. |
protected static Object |
$readRef(java.lang.Class<? extends Object._Proxy> proxyClass,
RefTypeEnum refType,
java.io.ObjectInput in,
Store store,
java.util.Iterator<java.lang.Long> intraStoreRefs)
A helper method for reading a pointer during object deserialization. |
void |
$serialize(java.io.ObjectOutput serializedOutput,
java.util.List<RefTypeEnum> refTypes,
java.util.List<java.lang.Long> intraStoreRefs,
java.util.List<Pair<java.lang.String,java.lang.Long>> interStoreRefs)
Serializes the non-transient fields of this object. |
java.lang.Object |
$unwrap()
Unwraps a wrapped Java inlineable. |
protected static void |
$writeInline(java.io.ObjectOutput out,
java.lang.Object obj)
Serializes an object to the given ObjectOutput. |
protected static void |
$writeRef(Store store,
Object obj,
java.util.List<RefTypeEnum> refType,
java.io.ObjectOutput out,
java.util.List<java.lang.Long> intraStoreRefs,
java.util.List<Pair<java.lang.String,java.lang.Long>> interStoreRefs)
A helper method for serializing a reference during object serialization. |
Object._Impl |
clone()
|
Statistics |
createStatistics()
Creates a Statistics object to determine promises for this Object. |
boolean |
equals(java.lang.Object o)
Default equals implementation uses pointer equality. |
boolean |
equals(Object o)
Default equals implementation uses pointer equality. |
Object._Impl |
fetch()
Fetches the object if this is a proxy; returns itself if it's an impl. |
Label |
get$label()
Label for this object |
int |
hashCode()
Default hashCode implementation uses the OID to compute the hash value. |
boolean |
idEquals(Object other)
Whether this object has the same identity as another object. |
java.lang.String |
toString()
Default toString implementation prints out the class name and global object name. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final FabricSoftRef $ref
protected Object._Proxy $class
protected Label $label
public int $version
public Log $writer
public Log $writeLockHolder
public Log $reader
public Object._Impl $history
public ReadMapEntry $readMapEntry
TransactionManager.readMap
public int $numWaiting
public boolean $isOwned
public int $updateMapVersion
Constructor Detail |
---|
public Object._Impl(Store store, Label label) throws UnreachableNodeException
store
- the location for the objectlabel
- the security label for the object
UnreachableNodeException
public Object._Impl(Store store, long onum, int version, long expiry, long label, java.io.ObjectInput serializedInput, java.util.Iterator<RefTypeEnum> refTypes, java.util.Iterator<java.lang.Long> intraStoreRefs) throws java.io.IOException, java.lang.ClassNotFoundException
store
- The store on which the object lives.onum
- The object's onum.version
- The object's version number.label
- Onum of the object's label.serializedInput
- A stream of serialized primitive values and inlined objects.refTypes
- An iterator of RefTypeEnum
s indicating the type of
each reference being deserialized (e.g., null, inlined,
intraStore).intraStoreRefs
- An iterator of intra-store references, each represented by an
onum.
java.io.IOException
java.lang.ClassNotFoundException
Method Detail |
---|
public final Object._Impl clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Object o)
equals
in interface Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public final void $copyStateFrom(Object._Impl other)
public void $copyAppStateFrom(Object._Impl other)
super.copyAppStateFrom(other)
.
public final Store $getStore()
Object
$getStore
in interface Object
public final long $getOnum()
Object
$getOnum
in interface Object
public final Object._Proxy $getClass()
public final Label get$label()
Object
get$label
in interface Object
public final int $getVersion()
public final Object._Proxy $getProxy()
Object
$getProxy
in interface Object
public final boolean idEquals(Object other)
Object
idEquals
in interface Object
public final Object._Impl fetch()
Object
fetch
in interface Object
public Statistics createStatistics()
Object
createStatistics
in interface Object
public void $serialize(java.io.ObjectOutput serializedOutput, java.util.List<RefTypeEnum> refTypes, java.util.List<java.lang.Long> intraStoreRefs, java.util.List<Pair<java.lang.String,java.lang.Long>> interStoreRefs) throws java.io.IOException
serializedOutput
- An output stream for writing serialized primitive values and
inlined objects.refTypes
- A list to which RefTypeEnum
s will be written to
indicate the type of reference being serialized (e.g., null,
inlined, intraStore, interStore).intraStoreRefs
- A list to which onums denoting intra-store references will be
written.interStoreRefs
- A list to which global object names (hostname/onum pairs),
denoting inter-store references, will be written.
java.io.IOException
protected static final Object $readRef(java.lang.Class<? extends Object._Proxy> proxyClass, RefTypeEnum refType, java.io.ObjectInput in, Store store, java.util.Iterator<java.lang.Long> intraStoreRefs) throws java.io.IOException, java.lang.ClassNotFoundException
proxyClass
- The expected proxy class for the reference being read.refType
- The type of reference being read.in
- The stream from which to read any inlined objects.store
- The store to use when constructing any intra-store references.intraStoreRefs
- An iterator of intra-store references, each represented by an
onum.
java.lang.ClassNotFoundException
- Thrown when the class for a wrapped object is unavailable.
java.io.IOException
- Thrown when an I/O error has occurred in the given
ObjectInput
stream.protected static final void $writeInline(java.io.ObjectOutput out, java.lang.Object obj) throws java.io.IOException
java.io.IOException
protected static final void $writeRef(Store store, Object obj, java.util.List<RefTypeEnum> refType, java.io.ObjectOutput out, java.util.List<java.lang.Long> intraStoreRefs, java.util.List<Pair<java.lang.String,java.lang.Long>> interStoreRefs) throws java.io.IOException
store
- The referring object's store.obj
- The reference to be serialized.refType
- A list to which a RefTypeEnum
will be written to
indicate the type of reference being serialized (e.g., null,
inlined, intraStore, interStore).out
- An output stream for writing inlined objects.intraStoreRefs
- A list for writing intra-store references, represented by onums.interStoreRefs
- A list for writing denoting inter-store references, represented
by global object names (hostname/onum pairs).
java.io.IOException
protected Object._Proxy $makeProxy()
public final java.lang.Object $unwrap()
Object
$unwrap
in interface Object
public final void $forceRenumber(long onum)
This method changes the onum of the object. Unless if you really know what you're doing, you should not call this, as it leaves the system in an inconsistent state.
This method is used to initialize object databases with objects at well-known onums (e.g., naming map and store principal).
$forceRenumber
in interface Object
public static void _npe(Label lbl) throws java.lang.NullPointerException
java.lang.NullPointerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |