Apache REEF
0.15.0
Retainable Evaluator Execution Framework
|
Codec that can encode and decode a class depending on the class type. More...
Inherits Org.Apache.REEF.Wake.Remote.ICodec< T >.
Public Member Functions | |
MultiCodec () | |
Constructs a new MultiCodec object. More... | |
void | Register< U > (ICodec< U > codec) |
Register a codec to be used when encoding/decoding objects of this type. More... | |
void | Register< U > (ICodec< U > codec, string name) |
Register a codec to be used when encoding/decoding objects of this type. More... | |
byte[] | Encode (T obj) |
Encodes an object with the appropriate encoding or null if it cannot be encoded. More... | |
T | Decode (byte[] data) |
Decodes byte array into the appropriate object type. More... | |
Codec that can encode and decode a class depending on the class type.
|
inline |
Constructs a new MultiCodec object.
|
inline |
Decodes byte array into the appropriate object type.
data | Data to be decoded |
Implements Org.Apache.REEF.Wake.Remote.IDecoder< T >.
|
inline |
Encodes an object with the appropriate encoding or null if it cannot be encoded.
obj | Data to encode |
Implements Org.Apache.REEF.Wake.Remote.IEncoder< T >.
|
inline |
Register a codec to be used when encoding/decoding objects of this type.
U | The type of codec |
codec | The codec to use when encoding/decoding objects of this type |
U | : | T |
|
inline |
Register a codec to be used when encoding/decoding objects of this type.
U | The type of codec |
codec | The codec to use when encoding/decoding objects of this type |
name | The name of the class to encode/decode |
U | : | T |