Package io.vertx.core.shareddata

## Interface ClusterSerializable

- All Known Subinterfaces:
    `Buffer`
  All Known Implementing Classes:
    `JsonArray`, `JsonObject`, `NodeInfo`, `RegistrationInfo`, `Resource`

      public interface ClusterSerializable

  Objects implementing this interface will be written to and read from a `Buffer` when:
  - stored in and read from an `AsyncMap`, or
  - encodec to and decoded from an `EventBus` message body

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `readFromBuffer​(int pos, Buffer buffer)` | Method invoked when deserializing bytes to this instance.
    `void` | `writeToBuffer​(Buffer buffer)` | Method invoked when serializing this instance.

- - ### Method Detail

    - #### writeToBuffer

          void writeToBuffer​(Buffer buffer)

      Method invoked when serializing this instance.
      Parameters:
        `buffer` - the `Buffer` where the serialized bytes must be written to

    - #### readFromBuffer

          int readFromBuffer​(int pos,
                             Buffer buffer)

      Method invoked when deserializing bytes to this instance.
      Parameters:
        `pos` - the position where to start reading the `buffer`
        `buffer` - the `Buffer` where the serialized bytes must be read from
      Returns:
        the position after the last serialized byte