Package com.tangosol.io.pof.reflect
Class Codecs
- java.lang.Object
-
- com.tangosol.io.pof.reflect.Codecs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Codecs.AbstractCodec
AbstractCodec
implementations that encodes objects by simply delegating toPofWriter.writeObject(int, Object)
.static class
Codecs.ArrayCodec
Implementation ofCodec
that delegates toPofReader.readObjectArray(int, Object[])
andPofWriter.writeObjectArray(int, Object[])
to deserialize and serialize an object.static class
Codecs.CollectionCodec
Implementation ofCodec
that delegates toPofReader.readCollection(int, Collection)
andPofWriter.writeCollection(int, Collection)
to deserialize and serialize an object.static class
Codecs.DefaultCodec
Implementation ofCodec
that simply delegates toPofReader.readObject(int)
andPofWriter.writeObject(int, Object)
to deserialize and serialize an object.static class
Codecs.LongArrayCodec
Implementation ofCodec
that delegates toPofReader.readLongArray(int, LongArray)
andPofWriter.writeLongArray(int, LongArray)
to deserialize and serialize an object.static class
Codecs.MapCodec
Implementation ofCodec
that delegates toPofReader.readMap(int, Map)
andPofWriter.writeMap(int, Map)
to deserialize and serialize an object.
-
Field Summary
Fields Modifier and Type Field Description static Codec
DEFAULT_CODEC
A singleton instance of aCodecs.DefaultCodec
-
Constructor Summary
Constructors Constructor Description Codecs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Codec
getCodec(Class<?> clz)
Return aCodec
based on the provided Class.
-
-
-
Field Detail
-
DEFAULT_CODEC
public static final Codec DEFAULT_CODEC
A singleton instance of aCodecs.DefaultCodec
-
-
Method Detail
-
getCodec
public static Codec getCodec(Class<?> clz)
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
-
-