T
- The type of the value held.@Internal public class SerializedValue<T> extends Object implements Serializable
ClassNotFoundException
.
To work around that issue, the SerializedValue serialized data immediately into a byte array. When send through RPC or another service that uses serialization, only the byte array is transferred. The object is deserialized later (upon access) and requires the accessor to provide the corresponding class loader.
构造器和说明 |
---|
SerializedValue(T value) |
限定符和类型 | 方法和说明 |
---|---|
T |
deserializeValue(ClassLoader loader) |
boolean |
equals(Object obj) |
static <T> SerializedValue<T> |
fromBytes(byte[] serializedData) |
byte[] |
getByteArray()
Returns the serialized value or
null if no value is set. |
int |
hashCode() |
String |
toString() |
public SerializedValue(T value) throws IOException
IOException
public T deserializeValue(ClassLoader loader) throws IOException, ClassNotFoundException
public byte[] getByteArray()
null
if no value is set.public static <T> SerializedValue<T> fromBytes(byte[] serializedData)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.