|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.io.pof.reflect.AbstractPofValue
public abstract class AbstractPofValue
An abstract base class that implements common functionality for all PofValue types.
Field Summary | |
---|---|
protected int |
m_nType POF type identifer of this value. |
protected Object |
m_oValue Deserialized representation of this value. |
Constructor Summary | |
---|---|
AbstractPofValue(PofValue valueParent, ReadBuffer bufValue, PofContext ctx, int of, int nType) Construct a PofValue instance wrapping the supplied buffer. |
Method Summary | |
---|---|
Binary |
applyChanges() Apply all the changes that were made to this value and return a binary representation of the new value. |
ReadBuffer |
getChanges() Return a buffer containing changes made to this PofValue in the format defined by the BinaryDeltaCompressor . |
protected int |
getDirtyBytesCount() Get the estimated number of dirty bytes in this POF value hierarchy. |
int |
getOffset() Return the offset of this value from the beginning of POF stream. |
protected ReadBuffer |
getOriginalBuffer() Get the original buffer the changes should be applied to. |
PofValue |
getParent() Return the parent of this value. |
PofContext |
getPofContext() Return the POF context to use for serialization and deserialization. |
protected int |
getPropertyIndex() |
PofValue |
getRoot() Return the root of the hierarchy this value belongs to. |
ReadBuffer |
getSerializedValue() Return this value's serialized form. |
int |
getSize() Return the size of the encoded value in bytes. |
int |
getTypeId() Obtain the POF type identifier for this value. |
Object |
getValue() Return the deserialized value which this PofValue represents. |
Object |
getValue(Class clz) Return the deserialized value which this PofValue represents. |
Object |
getValue(int nType) Return the deserialized value which this PofValue represents. |
protected ReadBuffer |
getValueBuffer() Get the raw value buffer. |
protected void |
incrementDirtyBytesCount(int cb) Increment the counter representing the estimated number of bytes in the original buffer that have been modified. |
protected void |
incrementDirtyValuesCount() Increment the counter representing the number of values within this POF hierarchy that have been modified. |
boolean |
isDirty() Return true if this value has been modified, false otherwise. |
protected boolean |
isRoot() Return true if this instance is the root of the PofValue hierarchy. |
protected boolean |
isUniformEncoded() Return true if the buffer contains only the value, without the type identifier. |
protected void |
setDecorations(byte nDecoMask, ReadBuffer bufDeco) Set the decoration mask and decorations for the PofValue. |
protected void |
setDirty() Set the dirty flag for this value. |
protected void |
setOriginalBuffer(ReadBuffer bufValue) Set the original buffer the changes should be applied to. |
protected void |
setUniformEncoded() Specifies that the buffer contains only a value, without a type identifier. |
void |
setValue(Object oValue) Update this PofValue. |
Methods inherited from class com.tangosol.util.BitHelper |
---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString |
Methods inherited from interface com.tangosol.io.pof.reflect.PofValue |
---|
getChild |
Field Detail |
---|
protected int m_nType
protected Object m_oValue
Constructor Detail |
---|
public AbstractPofValue(PofValue valueParent, ReadBuffer bufValue, PofContext ctx, int of, int nType)
valueParent
- parent value within the POF streambufValue
- buffer containing POF representation of this valuectx
- POF context to use when reading or writing propertiesof
- offset of this value from the beginning of POF streamnType
- POF type identifier for this valueMethod Detail |
---|
public int getTypeId()
getTypeId
in interface PofValue
public PofValue getRoot()
getRoot
in interface PofValue
public PofValue getParent()
getParent
in interface PofValue
public Object getValue()
getValue
in interface PofValue
public Object getValue(Class clz)
getValue
in interface PofValue
clz
- the required class of the returned value or null if the class is to be inferred from the serialized statepublic Object getValue(int nType)
getValue
in interface PofValue
nType
- the required Pof type of the returned value or PofConstants.T_UNKNOWN
if the type is to be inferred from the serialized statepublic void setValue(Object oValue)
PofValue.getValue()
method, but will not be applied to the underlying POF stream until the PofValue.applyChanges()
method is invoked on the root PofValue.setValue
in interface PofValue
oValue
- new deserialized value for this PofValuepublic Binary applyChanges()
applyChanges
in interface PofValue
public ReadBuffer getChanges()
BinaryDeltaCompressor
. <p/> Note: this method can only be called on the root PofValuegetChanges
in interface PofValue
public PofContext getPofContext()
public int getOffset()
public int getSize()
public boolean isDirty()
protected void setDirty()
public ReadBuffer getSerializedValue()
protected int getPropertyIndex()
protected ReadBuffer getOriginalBuffer()
protected void setOriginalBuffer(ReadBuffer bufValue)
bufValue
- buffer containing the original valueprotected ReadBuffer getValueBuffer()
protected void setDecorations(byte nDecoMask, ReadBuffer bufDeco)
nDecoMask
- decoration identifiers bit maskbufDeco
- buffer containing the decorationsprotected boolean isRoot()
protected boolean isUniformEncoded()
protected void setUniformEncoded()
protected int getDirtyBytesCount()
protected void incrementDirtyValuesCount()
protected void incrementDirtyBytesCount(int cb)
cb
- the number of bytes to increment counter for
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |