Package org.apache.thrift.partial
Interface ThriftFieldValueProcessor<V>
- All Known Implementing Classes:
ThriftStructProcessor
public interface ThriftFieldValueProcessor<V>
Provides an abstraction to process deserialized field values and place them into the collection
that holds them. This abstraction allows different types of collections to be output from partial
deserialization.
In case of the usual Thrift deserialization, the collection that holds field values is simply an instance of TBase.
-
Method Summary
Modifier and TypeMethodDescriptioncreateNewList
(int expectedSize) createNewMap
(int expectedSize) createNewSet
(int expectedSize) createNewStruct
(ThriftMetadata.ThriftStruct metadata) prepareBinary
(ByteBuffer buffer) prepareEnum
(Class<? extends TEnum> enumClass, int ordinal) prepareList
(Object instance) prepareMap
(Object instance) prepareSet
(Object instance) prepareString
(ByteBuffer buffer) prepareStruct
(Object instance) void
setBinary
(V valueCollection, TFieldIdEnum fieldId, ByteBuffer value) void
setBool
(V valueCollection, TFieldIdEnum fieldId, boolean value) void
setByte
(V valueCollection, TFieldIdEnum fieldId, byte value) void
setDouble
(V valueCollection, TFieldIdEnum fieldId, double value) void
setEnumField
(V valueCollection, TFieldIdEnum fieldId, Object value) void
setInt16
(V valueCollection, TFieldIdEnum fieldId, short value) void
setInt32
(V valueCollection, TFieldIdEnum fieldId, int value) void
setInt64
(V valueCollection, TFieldIdEnum fieldId, long value) void
setListElement
(Object instance, int index, Object value) void
setListField
(V valueCollection, TFieldIdEnum fieldId, Object value) void
setMapElement
(Object instance, int index, Object key, Object value) void
setMapField
(V valueCollection, TFieldIdEnum fieldId, Object value) void
setSetElement
(Object instance, int index, Object value) void
setSetField
(V valueCollection, TFieldIdEnum fieldId, Object value) void
setString
(V valueCollection, TFieldIdEnum fieldId, ByteBuffer buffer) void
setStructField
(V valueCollection, TFieldIdEnum fieldId, Object value)
-
Method Details
-
createNewStruct
-
prepareStruct
-
setBool
-
setByte
-
setInt16
-
setInt32
-
setInt64
-
setDouble
-
setBinary
-
setString
-
setEnumField
-
setListField
-
setMapField
-
setSetField
-
setStructField
-
prepareEnum
-
prepareString
-
prepareBinary
-
createNewList
-
setListElement
-
prepareList
-
createNewMap
-
setMapElement
-
prepareMap
-
createNewSet
-
setSetElement
-
prepareSet
-