fabric.common
Class Surrogate

java.lang.Object
  extended by fabric.lang.Object._Impl
      extended by fabric.common.Surrogate
All Implemented Interfaces:
Object, java.lang.Cloneable

public final class Surrogate
extends Object._Impl

Encapsulates an inter-store pointer.


Nested Class Summary
 
Nested classes/interfaces inherited from interface fabric.lang.Object
Object._Impl, Object._Proxy, Object._Static
 
Field Summary
 long onum
          The onum for the object being pointed to.
 Store store
          The store for the object being pointed to.
 
Fields inherited from class fabric.lang.Object._Impl
$class, $history, $isOwned, $label, $numWaiting, $reader, $readMapEntry, $ref, $updateMapVersion, $version, $writeLockHolder, $writer
 
Constructor Summary
Surrogate(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)
           
 
Method Summary
protected  Object._Proxy $makeProxy()
          Subclasses should override this method.
 void $serialize(java.io.ObjectOutput out, 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.
 
Methods inherited from class fabric.lang.Object._Impl
_npe, $copyAppStateFrom, $copyStateFrom, $forceRenumber, $getClass, $getOnum, $getProxy, $getStore, $getVersion, $readRef, $unwrap, $writeInline, $writeRef, clone, createStatistics, equals, equals, fetch, get$label, hashCode, idEquals, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

store

public final Store store
The store for the object being pointed to.


onum

public final long onum
The onum for the object being pointed to.

Constructor Detail

Surrogate

public Surrogate(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
Throws:
java.io.IOException
java.lang.ClassNotFoundException
Method Detail

$makeProxy

protected Object._Proxy $makeProxy()
Description copied from class: Object._Impl
Subclasses should override this method.

Overrides:
$makeProxy in class Object._Impl

$serialize

public void $serialize(java.io.ObjectOutput out,
                       java.util.List<RefTypeEnum> refTypes,
                       java.util.List<java.lang.Long> intraStoreRefs,
                       java.util.List<Pair<java.lang.String,java.lang.Long>> interStoreRefs)
Description copied from class: Object._Impl
Serializes the non-transient fields of this object. Subclasses should call the super method first so that inherited fields are written before fields declared in this subclass. The order in which fields are written must be fixed and the same as the order used by the deserialization constructor.

Overrides:
$serialize in class Object._Impl
Parameters:
out - 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.