org.apache.tinkerpop.gremlin.driver.ser.binary.types

## Class EnumSerializer<E extends Enum>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.ser.binary.types.SimpleTypeSerializer<E>
  - - org.apache.tinkerpop.gremlin.driver.ser.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 and Description
    --- | ---
    `static EnumSerializer<SackFunctions.Barrier>` | `BarrierSerializer`
    `static EnumSerializer<VertexProperty.Cardinality>` | `CardinalitySerializer`
    `static EnumSerializer<Column>` | `ColumnSerializer`
    `static EnumSerializer<Direction>` | `DirectionSerializer`
    `static EnumSerializer<Operator>` | `OperatorSerializer`
    `static EnumSerializer<Order>` | `OrderSerializer`
    `static EnumSerializer<TraversalOptionParent.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 and Description
    --- | ---
    `ByteBuf` | `writeValue(E value, ByteBufAllocator allocator, GraphBinaryWriter context)` Writes a non-nullable value into a buffer using the provided allocator.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.driver.ser.binary.types.SimpleTypeSerializer

      `getDataType, read, readValue, write, writeValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

    - #### OperatorSerializer

          public static final EnumSerializer<Operator> OperatorSerializer

    - #### OrderSerializer

          public static final EnumSerializer<Order> OrderSerializer

    - #### PickSerializer

          public static final EnumSerializer<TraversalOptionParent.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

    - #### writeValue

          public ByteBuf writeValue(E value,
                                    ByteBufAllocator allocator,
                                    GraphBinaryWriter context)
                             throws SerializationException

      Description copied from class: `SimpleTypeSerializer`
      Writes a non-nullable value into a buffer using the provided allocator.
      Specified by:
        `writeValue` in class `SimpleTypeSerializer<E extends Enum>`
      Parameters:
        `value` - A non-nullable value.
        `allocator` - The buffer allocator to use.
        `context` - The binary writer.
      Throws:
        `SerializationException`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.