Class EnumSerializer<E extends Enum>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer<E>
-
- org.apache.tinkerpop.gremlin.structure.io.binary.types.EnumSerializer<E>
-
- All Implemented Interfaces:
TypeSerializer<E>
public class EnumSerializer<E extends Enum> extends SimpleTypeSerializer<E>
Generalized serializer for {#code Enum} value types.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Field Summary
Fields Modifier and Type Field Description static EnumSerializer<SackFunctions.Barrier>
BarrierSerializer
static EnumSerializer<VertexProperty.Cardinality>
CardinalitySerializer
static EnumSerializer<Column>
ColumnSerializer
static EnumSerializer<Direction>
DirectionSerializer
static EnumSerializer<DT>
DTSerializer
static EnumSerializer<Merge>
MergeSerializer
static EnumSerializer<Operator>
OperatorSerializer
static EnumSerializer<Order>
OrderSerializer
static EnumSerializer<Pick>
PickSerializer
static EnumSerializer<Pop>
PopSerializer
static EnumSerializer<Scope>
ScopeSerializer
static EnumSerializer<T>
TSerializer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected E
readValue(Buffer buffer, GraphBinaryReader context)
Reads a non-nullable value according to the type format.protected void
writeValue(E value, Buffer buffer, GraphBinaryWriter context)
Writes a non-nullable value into a buffer using the provided allocator.-
Methods inherited from class org.apache.tinkerpop.gremlin.structure.io.binary.types.SimpleTypeSerializer
getDataType, read, readValue, write, writeValue
-
-
-
-
Field Detail
-
BarrierSerializer
public static final EnumSerializer<SackFunctions.Barrier> BarrierSerializer
-
CardinalitySerializer
public static final EnumSerializer<VertexProperty.Cardinality> CardinalitySerializer
-
ColumnSerializer
public static final EnumSerializer<Column> ColumnSerializer
-
DirectionSerializer
public static final EnumSerializer<Direction> DirectionSerializer
-
DTSerializer
public static final EnumSerializer<DT> DTSerializer
-
MergeSerializer
public static final EnumSerializer<Merge> MergeSerializer
-
OperatorSerializer
public static final EnumSerializer<Operator> OperatorSerializer
-
OrderSerializer
public static final EnumSerializer<Order> OrderSerializer
-
PickSerializer
public static final EnumSerializer<Pick> PickSerializer
-
PopSerializer
public static final EnumSerializer<Pop> PopSerializer
-
ScopeSerializer
public static final EnumSerializer<Scope> ScopeSerializer
-
TSerializer
public static final EnumSerializer<T> TSerializer
-
-
Method Detail
-
readValue
protected E readValue(Buffer buffer, GraphBinaryReader context) throws IOException
Description copied from class:SimpleTypeSerializer
Reads a non-nullable value according to the type format.- Specified by:
readValue
in classSimpleTypeSerializer<E extends Enum>
- Parameters:
buffer
- A buffer which reader index has been set to the beginning of the {value}.context
- The binary reader.- Returns:
- Throws:
IOException
-
writeValue
protected void writeValue(E value, Buffer buffer, GraphBinaryWriter context) throws IOException
Description copied from class:SimpleTypeSerializer
Writes a non-nullable value into a buffer using the provided allocator.- Specified by:
writeValue
in classSimpleTypeSerializer<E extends Enum>
- Parameters:
value
- A non-nullable value.buffer
- The buffer allocator to use.context
- The binary writer.- Throws:
IOException
-
-