@Internal public class CompressedSerializedValue<T> extends SerializedValue<T>
SerializedValue that compresses the value after the serialization.| Modifier and Type | Method and Description | 
|---|---|
T | 
deserializeValue(ClassLoader loader)
Decompress and deserialize the data to get the original object. 
 | 
static <T> CompressedSerializedValue<T> | 
fromBytes(byte[] compressedSerializedData)
Construct a compressed serialized value with a serialized byte array. 
 | 
static <T> CompressedSerializedValue<T> | 
fromObject(T object)
Constructs a compressed serialized value for the given object. 
 | 
int | 
getSize()
Returns the size of the compressed serialized data. 
 | 
String | 
toString()  | 
equals, getByteArray, hashCodepublic T deserializeValue(ClassLoader loader) throws IOException, ClassNotFoundException
deserializeValue in class SerializedValue<T>loader - the classloader to deserializeIOException - exception during decompression and deserializationClassNotFoundException - if class is not found in the classloaderpublic int getSize()
public static <T> CompressedSerializedValue<T> fromObject(T object) throws IOException
object - the object to serialize and compressNullPointerException - if object is nullIOException - exception during serialization and compressionpublic static <T> CompressedSerializedValue<T> fromBytes(byte[] compressedSerializedData)
The byte array must be the result of serialization and compression with InstantiationUtil.serializeObjectAndCompress(java.lang.Object).
T - type of the objectcompressedSerializedData - the compressed serialized byte arrayCompressedSerializedValue that can be deserialized as the objectpublic String toString()
toString in class SerializedValue<T>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.