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
Modifier and TypeClassDescriptionstatic class
AbstractCodec
implementations that encodes objects by simply delegating toPofWriter.writeObject(int, Object)
.static class
Implementation ofCodec
that delegates toPofReader.readObjectArray(int, Object[])
andPofWriter.writeObjectArray(int, Object[])
to deserialize and serialize an object.static class
Implementation ofCodec
that delegates toPofReader.readCollection(int, Collection)
andPofWriter.writeCollection(int, Collection)
to deserialize and serialize an object.static class
Implementation ofCodec
that simply delegates toPofReader.readObject(int)
andPofWriter.writeObject(int, Object)
to deserialize and serialize an object.static class
Implementation ofCodec
that delegates toPofReader.readLongArray(int, LongArray)
andPofWriter.writeLongArray(int, LongArray)
to deserialize and serialize an object.static class
Implementation ofCodec
that delegates toPofReader.readMap(int, Map)
andPofWriter.writeMap(int, Map)
to deserialize and serialize an object. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Codec
A singleton instance of aCodecs.DefaultCodec
-
Constructor Summary
-
Method Summary
-
Field Details
-
DEFAULT_CODEC
A singleton instance of aCodecs.DefaultCodec
-
-
Constructor Details
-
Codecs
public Codecs()
-
-
Method Details
-
getCodec
Return aCodec
based 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
Collection
interface and have a no-arg constructor. A Codec supporting Collections will be returned - Map - the provided class should implement the
Map
interface and have a no-arg constructor. A Codec supporting Maps will be returned - LongArray - the provided class should implement the
LongArray
interface 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
-