public static class Object._Impl extends java.lang.Object implements Object, java.lang.Cloneable
Object._Impl, Object._Proxy, Object._Static| Modifier and Type | Field and Description |
|---|---|
protected ConfPolicy |
$accessPolicy |
ObjectCache.Entry |
$cacheEntry
The worker's cache entry object for this _Impl.
|
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.
|
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.
|
ReadMap.Entry |
$readMapEntry
A reference to the global read list for this object.
|
FabricSoftRef |
$ref |
java.lang.StackTraceElement[] |
$stackTrace
A stack trace of where this object was created.
|
protected Label |
$updateLabel |
int |
$version |
Log |
$writeLockHolder
The innermost transaction that is holding a write lock on the object.
|
java.lang.StackTraceElement[] |
$writeLockStackTrace
Stack trace for where the write lock for this object was obtained.
|
Log |
$writer
The unique running transaction that can write to the object, or null if
none.
|
static boolean |
TRACE_OBJECTS
A debugging switch for storing a stack trace each time an _Impl is
created.
|
int |
writerMapVersion
The version number on the last update-map that was checked.
|
| Constructor and Description |
|---|
_Impl(Store store)
Creates a new Fabric object that will reside on the given Store.
|
_Impl(Store store,
long onum,
int version,
long expiry,
Store updateLabelStore,
long updateLabelOnum,
Store accessPolicyStore,
long accessPolicyOnum,
java.io.ObjectInput serializedInput,
java.util.Iterator<RefTypeEnum> refTypes,
java.util.Iterator<java.lang.Long> intraStoreRefs,
java.util.Iterator<Pair<java.lang.String,java.lang.Long>> interStoreRefs)
This is the deserialization constructor and reconstructs the object from
its serialized state.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
Store |
$getStore()
The store where the object resides.
|
int |
$getVersion() |
Object |
$initLabels()
Initializes the object's update label and access policy.
|
void |
$initPartitions()
Initializes the object's partitions (if any) by calling their initializer
methods.
|
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,
java.util.Iterator<Pair<java.lang.String,java.lang.Long>> interStoreRefs)
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 |
fabric$lang$Object$()
Calls $initLabels
|
Object._Impl |
fetch()
Fetches the object if this is a proxy; returns itself if it's an impl.
|
ConfPolicy |
get$$accessPolicy()
The object's access policy, specifying the program contexts in which it is
safe to use this object.
|
Label |
get$$updateLabel()
The label that protects this object at run time.
|
int |
hashCode()
Default hashCode implementation uses oidHashCode().
|
boolean |
idEquals(Object other)
Whether this object has the same identity as another object.
|
int |
oidHashCode()
A hash of the object's oid.
|
static int |
oidHashCode(Object o)
This static version of oidHashCode is to be used by Fabric programs.
|
ConfPolicy |
set$$accessPolicy(ConfPolicy policy) |
Label |
set$$updateLabel(Label label) |
java.lang.String |
toString()
Default toString implementation prints out the class name and global
object name.
|
public final FabricSoftRef $ref
public final ObjectCache.Entry $cacheEntry
protected Object._Proxy $class
protected Label $updateLabel
protected ConfPolicy $accessPolicy
public int $version
public Log $writer
public Log $writeLockHolder
public java.lang.StackTraceElement[] $writeLockStackTrace
public Log $reader
public Object._Impl $history
public final ReadMap.Entry $readMapEntry
TransactionManager.readMappublic int $numWaiting
public boolean $isOwned
public int writerMapVersion
public final java.lang.StackTraceElement[] $stackTrace
public static boolean TRACE_OBJECTS
public _Impl(Store store) throws UnreachableNodeException
store - the location for the objectUnreachableNodeExceptionpublic _Impl(Store store, long onum, int version, long expiry, Store updateLabelStore, long updateLabelOnum, Store accessPolicyStore, long accessPolicyOnum, java.io.ObjectInput serializedInput, java.util.Iterator<RefTypeEnum> refTypes, java.util.Iterator<java.lang.Long> intraStoreRefs, java.util.Iterator<Pair<java.lang.String,java.lang.Long>> interStoreRefs) 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.updateLabelStore - The store holding the object's update label.updateLabelOnum - Onum of the object's update label.accessPolicyStore - The store holding the object's access policy.accessPolicyOnum - onum of the object's access policy.serializedInput - A stream of serialized primitive values and inlined objects.refTypes - An iterator of RefTypeEnums 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.interStoreRefs - An iterator of inter-store references.java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic final Object._Impl clone()
clone in class java.lang.Objectpublic Object $initLabels()
Object$initLabels in interface Objectpublic void $initPartitions()
Subclasses overriding this method must call super.$initPartitions().
$initPartitions in interface Objectpublic Object fabric$lang$Object$()
Objectfabric$lang$Object$ in interface Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean equals(Object o)
public int hashCode()
hashCode in class java.lang.Objectpublic int oidHashCode()
ObjectoidHashCode in interface Objectpublic static int oidHashCode(Object o)
o to prevent the Fabric type
system from thinking the object will be fetched, when it really won't be.public java.lang.String toString()
toString in class java.lang.Objectpublic final void $copyStateFrom(Object._Impl other)
public void $copyAppStateFrom(Object._Impl other)
super.copyAppStateFrom(other).public final Store $getStore()
Objectpublic final long $getOnum()
Objectpublic final Object._Proxy $getClass()
public final Label get$$updateLabel()
Objectget$$updateLabel in interface Objectpublic final Label set$$updateLabel(Label label)
set$$updateLabel in interface Objectpublic final ConfPolicy get$$accessPolicy()
Objectget$$accessPolicy in interface Objectpublic final ConfPolicy set$$accessPolicy(ConfPolicy policy)
set$$accessPolicy in interface Objectpublic final int $getVersion()
public final Object._Proxy $getProxy()
public final boolean idEquals(Object other)
Objectpublic final Object._Impl fetch()
Objectpublic Statistics createStatistics()
ObjectcreateStatistics in interface Objectpublic 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 RefTypeEnums 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.IOExceptionprotected 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, java.util.Iterator<Pair<java.lang.String,java.lang.Long>> interStoreRefs) 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.interStoreRefs - An iterator of inter-store references.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.IOExceptionprotected 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.IOExceptionprotected Object._Proxy $makeProxy()
public final java.lang.Object $unwrap()
Object@Deprecated 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 Objectpublic static void _npe(Label lbl)
throws java.lang.NullPointerException
java.lang.NullPointerException