Package com.tangosol.io.pof
Class PofBufferWriter.ReferenceLibrary
- java.lang.Object
-
- com.tangosol.io.pof.PofBufferWriter.ReferenceLibrary
-
- Enclosing class:
- PofBufferWriter
public static class PofBufferWriter.ReferenceLibrary extends Object
A "library" of object references and their corresponding identities in the POF stream.
-
-
Field Summary
Fields Modifier and Type Field Description protected IdentityHashMap
m_mapIdentities
A map from objects that can be referenced to their Integer identities.
-
Constructor Summary
Constructors Constructor Description ReferenceLibrary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIdentity(Object o)
Look up an identity for an object.int
registerReference(Object o)
Register an object.
-
-
-
Field Detail
-
m_mapIdentities
protected IdentityHashMap m_mapIdentities
A map from objects that can be referenced to their Integer identities.
-
-
Method Detail
-
getIdentity
public int getIdentity(Object o)
Look up an identity for an object.- Parameters:
o
- the object- Returns:
- the identity, or -1 if the object is not registered
-
registerReference
public int registerReference(Object o)
Register an object.- Parameters:
o
- the object- Returns:
- the assigned identity for the object
- Throws:
IllegalStateException
- if the object is already registered
-
-