public class TupleMarshalledBinding<E extends MarshalledTupleEntry> extends TupleBinding<E>
TupleBinding that delegates to the
MarshalledTupleEntry interface of the data or key object.
This class works by calling the methods of the MarshalledTupleEntry interface, which must be implemented by the key or
data class, to convert between the key or data entry and the object.
| Constructor and Description |
|---|
TupleMarshalledBinding(java.lang.Class<E> cls)
Creates a tuple marshalled binding object.
|
| Modifier and Type | Method and Description |
|---|---|
E |
entryToObject(TupleInput input)
Constructs a key or data object from a
TupleInput entry. |
void |
objectToEntry(E object,
TupleOutput output)
Converts a key or data object to a tuple entry.
|
entryToObject, getPrimitiveBinding, objectToEntryentryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSizepublic TupleMarshalledBinding(java.lang.Class<E> cls)
The given class is used to instantiate key or data objects using
Class.newInstance(), and therefore must be a public class and have
a public no-arguments constructor. It must also implement the MarshalledTupleEntry interface.
cls - is the class of the key or data objects.public E entryToObject(TupleInput input)
TupleBindingTupleInput entry.entryToObject in class TupleBinding<E extends MarshalledTupleEntry>input - is the tuple key or data entry.public void objectToEntry(E object, TupleOutput output)
TupleBindingobjectToEntry in class TupleBinding<E extends MarshalledTupleEntry>object - is the key or data object.output - is the tuple entry to which the key or data should be
written.Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.