org.apache.geode.experimental.driver

## Interface ValueSerializer

- All Known Implementing Classes:
    NoOpSerializer

      @Experimental
      public interface ValueSerializer

  Interface for controlling serialization format of all values transmitted using the protobuf based client-server protocol. Use this serializer by calling `DriverFactory.setValueSerializer(ValueSerializer)` On the server side, there must be a registered ValueSerializer with the same id.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `deserialize(com.google.protobuf.ByteString bytes)` Deserialize an object from a byte array.
    `java.lang.String` | `getID()` Return the id of this value format.
    `com.google.protobuf.ByteString` | `serialize(java.lang.Object object)` Serialize an object into a byte array.
    `boolean` | `supportsPrimitives()` True if this serializer wants to serialize all values, including primitives like numbers and strings that can be sent as one of the options in EncodedValue.

- - ### Method Detail

    - #### serialize

          com.google.protobuf.ByteString serialize(java.lang.Object object)
                                            throws java.io.IOException

      Serialize an object into a byte array.
      Returns:
        a byte array, or null to fall back on default serialization
      Throws:
        `java.io.IOException`

    - #### deserialize

          java.lang.Object deserialize(com.google.protobuf.ByteString bytes)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException

      Deserialize an object from a byte array.
      Throws:
        `java.io.IOException`
        `java.lang.ClassNotFoundException`

    - #### getID

          java.lang.String getID()

      Return the id of this value format. This should match the id of the ValueSerializer registered on the server.

    - #### supportsPrimitives

          boolean supportsPrimitives()

      True if this serializer wants to serialize all values, including primitives like numbers and strings that can be sent as one of the options in EncodedValue.
      Returns: