Package com.tangosol.io.pof.reflect
Class Codecs
java.lang.Object
com.tangosol.io.pof.reflect.Codecs
Codecs is a container for accessing default
Codec implementations.- Since:
- 3.7.1
- Author:
- hr
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractCodecimplementations that encodes objects by simply delegating toPofWriter.writeObject(int, Object).static classImplementation ofCodecthat delegates toPofReader.readObjectArray(int, Object[])andPofWriter.writeObjectArray(int, Object[])to deserialize and serialize an object.static classImplementation ofCodecthat delegates toPofReader.readCollection(int, Collection)andPofWriter.writeCollection(int, Collection)to deserialize and serialize an object.static classImplementation ofCodecthat simply delegates toPofReader.readObject(int)andPofWriter.writeObject(int, Object)to deserialize and serialize an object.static classImplementation ofCodecthat delegates toPofReader.readLongArray(int, LongArray)andPofWriter.writeLongArray(int, LongArray)to deserialize and serialize an object.static classImplementation ofCodecthat delegates toPofReader.readMap(int, Map)andPofWriter.writeMap(int, Map)to deserialize and serialize an object. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CodecA singleton instance of aCodecs.DefaultCodec -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_CODEC
A singleton instance of aCodecs.DefaultCodec
-
-
Constructor Details
-
Codecs
public Codecs()
-
-
Method Details
-
getCodec
Return aCodecbased on the provided Class.The provided Class should implement one of:
- Codec - the Codec implementation should have a no-arg constructor which will be instantiated and returned.
- Collection - the provided class should implement the
Collectioninterface and have a no-arg constructor. A Codec supporting Collections will be returned - Map - the provided class should implement the
Mapinterface and have a no-arg constructor. A Codec supporting Maps will be returned - LongArray - the provided class should implement the
LongArrayinterface and have a no-arg constructor. A Codec supporting LongArrays will be returned - T[] - the provided class should be an array and the component type of the array should have a no-arg constructor. A Codec supporting arrays will be returned
- Parameters:
clz- a Class that implements Codec or is one of the supported types- Returns:
- a Codec that supports encoding and decoding of objects of the specified type
-