|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
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.io.pof.PofHelper
com.tangosol.io.pof.PofBufferReader
com.tangosol.io.pof.PofBufferReader.UserTypeReader
public static class PofBufferReader.UserTypeReader
The UserTypeReader implementation is a contextually-aware PofReader whose purpose is to advance through the properties of a value of a specified user type. The "contextual awareness" refers to the fact that the UserTypeReader maintains state about the type identifier and version of the user type, the parser's property index position within the user type value, and a PofContext that may differ from the PofContext that provided the PofSerializer which is using this UserTypeReader to parse a user type.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.io.pof.PofBufferReader |
---|
PofBufferReader.IdentityHolder, PofBufferReader.UserTypeReader |
Nested classes/interfaces inherited from class com.tangosol.io.pof.PofHelper |
---|
PofHelper.ReadableEntrySetMap, PofHelper.WriteableEntrySetMap |
Field Summary |
---|
Fields inherited from class com.tangosol.io.pof.PofBufferReader |
---|
m_arrayRefs, m_ctx, m_in |
Fields inherited from class com.tangosol.io.pof.PofHelper |
---|
BIGDECIMAL_ZERO, BIGINTEGER_MAX_LONG, BIGINTEGER_MIN_LONG, BINARY_EMPTY, BOOLEAN_ARRAY_EMPTY, BYTE_ARRAY_EMPTY, CHAR_ARRAY_EMPTY, COLLECTION_EMPTY, DOUBLE_ARRAY_EMPTY, FLOAT_ARRAY_EMPTY, INT_ARRAY_EMPTY, LONG_ARRAY_EMPTY, OBJECT_ARRAY_EMPTY, SHORT_ARRAY_EMPTY |
Constructor Summary | |
---|---|
PofBufferReader.UserTypeReader(PofBufferReader parent, ReadBuffer.BufferInput in, PofContext ctx, int nTypeId, int nVersionId) Construct a parser for parsing the property values of a user type. |
|
PofBufferReader.UserTypeReader(ReadBuffer.BufferInput in, PofContext ctx, int nTypeId, int nVersionId) Construct a parser for parsing the property values of a user type. |
Method Summary | |
---|---|
protected boolean |
advanceTo(int iProp) Advance through the POF stream until the specified property is found. |
protected void |
closeNested() Notify the UserTypeReader that it is being "closed". |
protected void |
complete(int iProp) Register the completion of the parsing of a value. |
PofReader |
createNestedPofReader(int iProp) Obtain a PofReader that can be used to read a set of properties from a single property of the current user type. |
protected PofBufferReader |
getParentParser() If this parser is contextually within a user type, obtain the parser which created this parser in order to parse the user type. |
int |
getUserTypeId() Determine the user type that is currently being parsed. |
int |
getVersionId() Determine the version identifier of the user type that is currently being parsed. |
Binary |
readRemainder() Read all remaining indexed properties of the current user type from the POF stream. |
void |
registerIdentity(java.lang.Object o) Register an identity for a newly created user type instance. |
Constructor Detail |
---|
public PofBufferReader.UserTypeReader(ReadBuffer.BufferInput in, PofContext ctx, int nTypeId, int nVersionId) throws java.io.IOException
in
- the BufferInput that contains the user type data, except for the user type id itself (which is passed passed as a constructor argument)ctx
- the PofContext to use for parsing the user type property values within the user type that this parser will be parsingnTypeId
- the type id of the user typenVersionId
- the version id of the user typejava.io.IOException
- if an I/O error occurspublic PofBufferReader.UserTypeReader(PofBufferReader parent, ReadBuffer.BufferInput in, PofContext ctx, int nTypeId, int nVersionId) throws java.io.IOException
parent
- the parent (ie the containing) PofBufferReaderin
- the BufferInput that contains the user type data, except for the user type id itself (which is passed passed as a constructor argument)ctx
- the PofContext to use for parsing the user type property values within the user type that this parser will be parsingnTypeId
- the type id of the user typenVersionId
- the version id of the user typejava.io.IOException
- if an I/O error occursMethod Detail |
---|
public int getUserTypeId()
getUserTypeId
in interface PofReader
getUserTypeId
in class PofBufferReader
public int getVersionId()
getVersionId
in interface PofReader
getVersionId
in class PofBufferReader
public void registerIdentity(java.lang.Object o)
If identity/reference types are enabled, an identity is used to uniquely identify a user type instance within a POF stream. The identity immediately proceeds the instance value in the POF stream and can be used later in the stream to reference the instance.
PofSerializer implementations must call this method with the user type instance instantiated during deserialization prior to reading any properties of the instance which are user type instances themselves.
registerIdentity
in interface PofReader
registerIdentity
in class PofBufferReader
o
- the object to register the identity forPofSerializer.deserialize(PofReader)
public PofReader createNestedPofReader(int iProp) throws java.io.IOException
createNestedPofReader
in interface PofReader
createNestedPofReader
in class PofBufferReader
iProp
- the property index to read fromjava.io.IOException
- if an I/O error occurspublic Binary readRemainder() throws java.io.IOException
Subsequent calls to the various readXYZ methods of this interface will fail after this method is called.
readRemainder
in interface PofReader
readRemainder
in class PofBufferReader
java.io.IOException
- if an I/O error occursprotected boolean advanceTo(int iProp) throws java.io.IOException
advanceTo
in class PofBufferReader
iProp
- the index of the property to advance tojava.io.IOException
- if an I/O error occursprotected void complete(int iProp) throws java.io.IOException
complete
in class PofBufferReader
iProp
- the property indexjava.io.IOException
- if an I/O error occursprotected void closeNested() throws java.io.IOException
java.io.IOException
- if an I/O error occursprotected PofBufferReader getParentParser()
getParentParser
in class PofBufferReader
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |