Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


com.tangosol.io.pof.reflect
Class ComplexPofValue

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.io.pof.reflect.AbstractPofValue
                  extended by com.tangosol.io.pof.reflect.ComplexPofValue

All Implemented Interfaces:
PofValue
Direct Known Subclasses:
PofArray, PofSparseArray

public abstract class ComplexPofValue
extends AbstractPofValue

An abstract base class for complex POF types, such as collections, arrays, maps, and user types.

Since:
Coherence 3.5
Author:
as 2009.02.12

Field Summary
static int TYPE_UNKNOWN
           

 

Fields inherited from class com.tangosol.io.pof.reflect.AbstractPofValue
m_nType, m_oValue

 

Constructor Summary
ComplexPofValue(PofValue valueParent, ReadBuffer bufValue, PofContext ctx, int of, int nType, int ofChildren)
          Construct a PofValue instance wrapping the supplied buffer.

 

Method Summary
protected  PofValue extractChild(ReadBuffer buf, int of, int cb)
          Extract child PofValue from a buffer.
protected  PofValue findChild(int nIndex)
          Find the child value with the specified index.
protected abstract  PofValue findChildInternal(int nIndex, int ofStart, int iStart)
          Find the child value with the specified index.
 PofValue getChild(int nIndex)
          Locate a child PofValue contained within this PofValue.
 java.util.Iterator getChildrenIterator()
          Return an iterator over all parsed child values.
protected  int getLastChildIndex(int nIndex)
          Return index of the last parsed child with an index lower than the specified one.
protected  int getUniformElementType()
          Return the uniform element type (if this is a uniform collection).
protected  boolean isUniformCollection()
          Return true if this complex value is encoded as one of uniform collection types.
protected  void setUniformElementType(int nElementType)
          Set the uniform element type for this collection.
protected  void skipChild(ReadBuffer.BufferInput in)
          Skip a single child value.

 

Methods inherited from class com.tangosol.io.pof.reflect.AbstractPofValue
applyChanges, getChanges, getDirtyBytesCount, getOffset, getOriginalBuffer, getParent, getPofContext, getPropertyIndex, getRoot, getSerializedValue, getSize, getTypeId, getValue, getValueBuffer, incrementDirtyBytesCount, incrementDirtyValuesCount, isDirty, isRoot, isUniformEncoded, setDecorations, setDirty, setOriginalBuffer, setUniformEncoded, setValue

 

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

 

Field Detail

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
See Also:
Constant Field Values

Constructor Detail

ComplexPofValue

public ComplexPofValue(PofValue valueParent,
                       ReadBuffer bufValue,
                       PofContext ctx,
                       int of,
                       int nType,
                       int ofChildren)
Construct a PofValue instance wrapping the supplied buffer.
Parameters:
valueParent - parent value within the POF stream
bufValue - buffer containing POF representation of this value
ctx - POF context to use when reading or writing properties
of - offset of this value from the beginning of POF stream
nType - POF type identifier for this value
ofChildren - offset of the first child element within this value

Method Detail

getChild

public PofValue getChild(int nIndex)
Locate a child PofValue contained within this PofValue. <p/> Note: the returned PofValue could represent a non-existent (null) value.
Parameters:
nIndex - index of the child value
Returns:
the child PofValue

getChildrenIterator

public java.util.Iterator getChildrenIterator()
Return an iterator over all parsed child values.
Returns:
a children iterator

getUniformElementType

protected int getUniformElementType()
Return the uniform element type (if this is a uniform collection).
Returns:
uniform element type, or TYPE_UNKNOWN if this is not a uniform collection

setUniformElementType

protected void setUniformElementType(int nElementType)
Set the uniform element type for this collection.
Parameters:
nElementType - uniform element type

findChild

protected PofValue findChild(int nIndex)
Find the child value with the specified index.
Parameters:
nIndex - index of the child value to find
Returns:
the child value

getLastChildIndex

protected int getLastChildIndex(int nIndex)
Return index of the last parsed child with an index lower than the specified one.
Parameters:
nIndex - index to find the preceding child index for
Returns:
index of the last parsed child, or -1 if one does not exist

isUniformCollection

protected boolean isUniformCollection()
Return true if this complex value is encoded as one of uniform collection types.
Returns:
true if this is a uniform collection

skipChild

protected void skipChild(ReadBuffer.BufferInput in)
                  throws java.io.IOException
Skip a single child value.
Parameters:
in - buffer input containing child values
Throws:
java.io.IOException - if an I/O error occurs

extractChild

protected PofValue extractChild(ReadBuffer buf,
                                int of,
                                int cb)
Extract child PofValue from a buffer.
Parameters:
buf - parent buffer to extract the child from
of - offset of the child within the parent buffer
cb - length of the child in bytes
Returns:
extracted PofValue

findChildInternal

protected abstract PofValue findChildInternal(int nIndex,
                                              int ofStart,
                                              int iStart)
Find the child value with the specified index.
Parameters:
nIndex - index of the child value to find
ofStart - offset within the parent buffer to start search from
iStart - index of the child value to start search from
Returns:
the child value

Skip navigation links

Oracle® Coherence Java API Reference
v3.5.1

E15583-01


Copyright © 2000, 2009, Oracle. All rights reserved.