|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-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 LongArray |
m_arrayRefsLazily-constructed mapping of identities to references. |
protected int |
m_nTypePOF type identifer of this value. |
protected java.lang.Object |
m_oValueDeserialized 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. |
protected LongArray |
ensureReferenceRegistry()Obtain the registry for identity-reference pairs, creating it if necessary. |
java.math.BigDecimal |
getBigDecimal()Return the BigDecimal which this PofValue represents. |
java.math.BigInteger |
getBigInteger()Return the BigInteger which this PofValue represents. |
boolean |
getBoolean()Return the boolean which this PofValue represents. |
boolean[] |
getBooleanArray()Return the boolean[] which this PofValue represents. |
byte |
getByte()Return the byte which this PofValue represents. |
byte[] |
getByteArray()Return the byte[] which this PofValue represents. |
ReadBuffer |
getChanges()Return a buffer containing changes made to this PofValue in the format defined by the BinaryDeltaCompressor. |
char |
getChar()Return the char which this PofValue represents. |
char[] |
getCharArray()Return the char[] which this PofValue represents. |
java.util.Collection |
getCollection(java.util.Collection coll)Return the Collection which this PofValue represents. |
java.util.Date |
getDate()Return the Date which this PofValue represents. |
protected int |
getDirtyBytesCount()Get the estimated number of dirty bytes in this POF value hierarchy. |
double |
getDouble()Return the double which this PofValue represents. |
double[] |
getDoubleArray()Return the double[] which this PofValue represents. |
float |
getFloat()Return the float which this PofValue represents. |
float[] |
getFloatArray()Return the float[] which this PofValue represents. |
int |
getInt()Return the int which this PofValue represents. |
int[] |
getIntArray()Return the int[] which this PofValue represents. |
long |
getLong()Return the long which this PofValue represents. |
long[] |
getLongArray()Return the long[] which this PofValue represents. |
java.util.Map |
getMap(java.util.Map map)Return the Map which this PofValue represents. |
java.lang.Object[] |
getObjectArray()Return the Object[] which this PofValue represents. |
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. |
short |
getShort()Return the short which this PofValue represents. |
short[] |
getShortArray()Return the short[] which this PofValue represents. |
int |
getSize()Return the size of the encoded value in bytes. |
java.lang.String |
getString()Return the String which this PofValue represents. |
int |
getTypeId()Obtain the POF type identifier for this value. |
java.lang.Object |
getValue()Return the deserialized value which this PofValue represents. |
java.lang.Object |
getValue(java.lang.Class clz)Return the deserialized value which this PofValue represents. |
java.lang.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 PofValue |
lookupIdentity(int nId)Look up the specified identity and return the PofValue to which it refers. |
protected void |
registerIdentity(int nId, java.lang.Object oValue)Register the passed value with the passed identity. |
protected void |
setDecorations(long 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(java.lang.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, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong |
| Methods inherited from interface com.tangosol.io.pof.reflect.PofValue |
|---|
getChild |
| Field Detail |
|---|
protected LongArray m_arrayRefs
protected int m_nType
protected java.lang.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 value| Method Detail |
|---|
public int getTypeId()
getTypeId in interface PofValuepublic PofValue getRoot()
getRoot in interface PofValuepublic PofValue getParent()
getParent in interface PofValuepublic java.lang.Object getValue()
Note: For primitive types such as int or boolean, the POF type is not stored in the POF stream. Therefore, for primitive types, the type or class must be explicitly specified via PofValue.getValue(int) or PofValue.getValue(Class).
getValue in interface PofValuepublic java.lang.Object getValue(java.lang.Class clz)
Note: For primitive types such as int or boolean, the POF type is not stored in the POF stream. Therefore, for primitive types, the clz parameter must not be null.
getValue in interface PofValueclz - the required class of the returned value or null if the class is to be inferred from the serialized statepublic java.lang.Object getValue(int nType)
Note: For primitive types such as int or boolean, the POF type is not stored in the POF stream. Therefore, for primitive types, the type must be explicitly specified with the nType parameter.
getValue in interface PofValuenType - 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(java.lang.Object oValue)
The changes made using this method will be immediately reflected in the result of 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 PofValueoValue - new deserialized value for this PofValuepublic Binary applyChanges()
Any format prefixes and/or decorations that were present in the original buffer this value orginated from will be preserved.
Note: this method can only be called on the root PofValue.
applyChanges in interface PofValuepublic ReadBuffer getChanges()
BinaryDeltaCompressor.
Note: this method can only be called on the root PofValue
getChanges in interface PofValuepublic boolean getBoolean()
getBoolean in interface PofValuepublic byte getByte()
getByte in interface PofValuepublic char getChar()
getChar in interface PofValuepublic short getShort()
getShort in interface PofValuepublic int getInt()
getInt in interface PofValuepublic long getLong()
getLong in interface PofValuepublic float getFloat()
getFloat in interface PofValuepublic double getDouble()
getDouble in interface PofValuepublic boolean[] getBooleanArray()
getBooleanArray in interface PofValuepublic byte[] getByteArray()
getByteArray in interface PofValuepublic char[] getCharArray()
getCharArray in interface PofValuepublic short[] getShortArray()
getShortArray in interface PofValuepublic int[] getIntArray()
getIntArray in interface PofValuepublic long[] getLongArray()
getLongArray in interface PofValuepublic float[] getFloatArray()
getFloatArray in interface PofValuepublic double[] getDoubleArray()
getDoubleArray in interface PofValuepublic java.math.BigInteger getBigInteger()
getBigInteger in interface PofValuepublic java.math.BigDecimal getBigDecimal()
getBigDecimal in interface PofValuepublic java.lang.String getString()
getString in interface PofValuepublic java.util.Date getDate()
getDate in interface PofValuepublic java.lang.Object[] getObjectArray()
getObjectArray in interface PofValuepublic java.util.Collection getCollection(java.util.Collection coll)
getCollection in interface PofValuecoll - the optional Collection to use to store the valuespublic java.util.Map getMap(java.util.Map map)
getMap in interface PofValuemap - the optional Map to use to store the valuespublic 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 LongArray ensureReferenceRegistry()
protected void registerIdentity(int nId,
java.lang.Object oValue)
nId - the identity within the POF stream of the objectoValue - the object to associate with the passed identityjava.lang.IllegalArgumentException - if the specified identity is already registered with a different object
protected PofValue lookupIdentity(int nId)
throws java.io.IOException
nId - the identityjava.io.IOException - if the requested identity is not registeredprotected ReadBuffer getValueBuffer()
protected void setDecorations(long 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® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||