public final class SerializedObject extends java.lang.Object implements FastSerializable, java.io.Serializable
_Impl objects are stored on stores in serialized form as
SerializedObjects.| Constructor and Description |
|---|
SerializedObject(java.io.DataInput in)
A deserialization constructor.
|
SerializedObject(long onum,
long updateLabel,
long accessPolicy,
Pair<java.lang.String,java.lang.Long> remoteRef)
Creates a serialized representation of a surrogate object.
|
SerializedObject(Object._Impl obj)
Deprecated.
This is method is rather inefficient. Use sparingly.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accessPolicyRefIsInterStore() |
Object._Impl |
deserialize(Store store)
Deserializes this object, traversing surrogates as necessary.
|
Object._Impl |
deserialize(Store store,
boolean chaseSurrogates)
Deserializes this object.
|
long |
getAccessPolicyOnum() |
java.lang.String |
getClassName() |
ClassRef |
getClassRef() |
long |
getExpiry() |
ComparablePair<java.lang.String,java.lang.Long> |
getInterStoreAccessPolicyRef() |
java.util.Iterator<ComparablePair<java.lang.String,java.lang.Long>> |
getInterStoreRefIterator() |
ComparablePair<java.lang.String,java.lang.Long> |
getInterStoreUpdateLabelRef() |
java.util.Iterator<java.lang.Long> |
getIntraStoreRefIterator() |
int |
getNumInterStoreRefs() |
int |
getNumIntraStoreRefs() |
int |
getNumRefTypes() |
long |
getOnum() |
java.util.Iterator<RefTypeEnum> |
getRefTypeIterator() |
java.io.InputStream |
getSerializedDataStream() |
long |
getUpdateLabelOnum() |
int |
getVersion() |
boolean |
isSurrogate()
Determines whether this object is a surrogate.
|
void |
setExpiry(long expiry)
Modifies the serialized object's promise expiry
|
void |
setRefs(java.util.List<java.lang.Long> intraStoreRefs)
Replaces the intra-store and inter-store references with the given
intra-store references.
|
void |
setVersion(int version)
Modifies the serialized object's version number.
|
int |
size() |
java.lang.String |
toString() |
boolean |
updateLabelRefIsInterStore() |
void |
write(java.io.DataOutput out)
Writes this SerializedObject out to the given output stream.
|
static void |
write(Object._Impl impl,
java.io.DataOutput out)
Writes the given _Impl out to the given output stream.
|
@Deprecated public SerializedObject(Object._Impl obj)
obj - The object to serialize.public SerializedObject(long onum,
long updateLabel,
long accessPolicy,
Pair<java.lang.String,java.lang.Long> remoteRef)
onum - The local object number for the surrogate.updateLabel - The onum for the surrogate's label object.remoteRef - The name of the remote object being referred to.public SerializedObject(java.io.DataInput in)
throws java.io.IOException
in - An input stream containing a serialized object.java.io.IOExceptionwrite(DataOutput),
#write(_Impl, DataOutput),
#readImpl(Store, DataInput)public long getOnum()
public int getVersion()
public void setVersion(int version)
public long getExpiry()
public void setExpiry(long expiry)
expiry - public boolean updateLabelRefIsInterStore()
public ComparablePair<java.lang.String,java.lang.Long> getInterStoreUpdateLabelRef()
InternalError - if the serialized object has an intra-store reference to its
label.public long getUpdateLabelOnum()
InternalError - if the serialized object has an inter-store reference to its
label.public boolean accessPolicyRefIsInterStore()
public ComparablePair<java.lang.String,java.lang.Long> getInterStoreAccessPolicyRef()
InternalError - if the serialized object has an intra-store reference to its
label.public long getAccessPolicyOnum()
InternalError - if the serialized object has an inter-store reference to its
label.public ClassRef getClassRef()
public java.lang.String getClassName()
public boolean isSurrogate()
public final int getNumRefTypes()
public java.util.Iterator<RefTypeEnum> getRefTypeIterator()
public final int getNumIntraStoreRefs()
public java.util.Iterator<java.lang.Long> getIntraStoreRefIterator()
public java.io.InputStream getSerializedDataStream()
public final int getNumInterStoreRefs()
public java.util.Iterator<ComparablePair<java.lang.String,java.lang.Long>> getInterStoreRefIterator()
public void setRefs(java.util.List<java.lang.Long> intraStoreRefs)
public java.lang.String toString()
toString in class java.lang.Objectpublic static void write(Object._Impl impl, java.io.DataOutput out) throws java.io.IOException
java.io.IOExceptionwrite(DataOutput),
#readImpl(Store, DataInput),
SerializedObject(DataInput)public void write(java.io.DataOutput out)
throws java.io.IOException
write in interface FastSerializablejava.io.IOExceptionSerializedObject#write(_Impl, DataOutput),
SerializedObject#readImpl(Store, DataInput),
SerializedObject(DataInput)public Object._Impl deserialize(Store store)
store - The store on which this object lives.java.lang.ClassNotFoundException - Thrown when the class for this object is unavailable.public Object._Impl deserialize(Store store, boolean chaseSurrogates)
store - The store on which this object lives.chaseSurrogates - whether surrogates should be traversed.java.lang.ClassNotFoundException - Thrown when the class for this object is unavailable.public int size()