org.apache.storm.serialization

## Class GzipBridgeThriftSerializationDelegate

- java.lang.Object
- - org.apache.storm.serialization.GzipBridgeThriftSerializationDelegate

- All Implemented Interfaces:
    SerializationDelegate

      public class GzipBridgeThriftSerializationDelegate
      extends Object
      implements SerializationDelegate

  Always writes gzip out, but tests incoming to see if it’s gzipped. If it is, deserializes with gzip. If not, uses `ThriftSerializationDelegate` to deserialize. Any logic needing to be enabled via `prepare(java.util.Map)` is passed through to both delegates.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GzipBridgeThriftSerializationDelegate()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `deserialize(byte[] bytes, Class<T> clazz)`
    `void` | `prepare(Map<String,Object> topoConf)` Lifecycle step that will be called after instantiating with nullary constructor.
    `byte[]` | `serialize(Object object)`

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

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

- - ### Constructor Detail

    - #### GzipBridgeThriftSerializationDelegate

          public GzipBridgeThriftSerializationDelegate()

  - ### Method Detail

    - #### prepare

          public void prepare(Map<String,Object> topoConf)

      Description copied from interface: `SerializationDelegate`

      Lifecycle step that will be called after instantiating with nullary constructor.

      Specified by:
        `prepare` in interface `SerializationDelegate`

    - #### serialize

          public byte[] serialize(Object object)

      Specified by:
        `serialize` in interface `SerializationDelegate`

    - #### deserialize

          public <T> T deserialize(byte[] bytes,
                                   Class<T> clazz)

      Specified by:
        `deserialize` in interface `SerializationDelegate`

Copyright © 2021 The Apache Software Foundation. All rights reserved.