backtype.storm.serialization
Class GzipBridgeSerializationDelegate

java.lang.Object
  extended by backtype.storm.serialization.GzipBridgeSerializationDelegate
All Implemented Interfaces:
SerializationDelegate

public class GzipBridgeSerializationDelegate
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 DefaultSerializationDelegate to deserialize. Any logic needing to be enabled via prepare(java.util.Map) is passed through to both delegates.


Constructor Summary
GzipBridgeSerializationDelegate()
           
 
Method Summary
 Object deserialize(byte[] bytes)
           
 void prepare(Map stormConf)
          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

GzipBridgeSerializationDelegate

public GzipBridgeSerializationDelegate()
Method Detail

prepare

public void prepare(Map stormConf)
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 Object deserialize(byte[] bytes)
Specified by:
deserialize in interface SerializationDelegate


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.