T - the type that can be converted@Deprecated @PublicSpi public interface Marshaller<T> extends com.atlassian.marshalling.api.Marshaller<T>, com.atlassian.marshalling.api.Unmarshaller<T>
bytes.
Notes:
unmarshall(byte[]) method should only ever be passed data that was generated by
calling the marshall(Object) method on an instance of Marshaller associated
with a cache with the same name. However, the
unmarshall(byte[]) should endeavour to be robust in the event of arbitrary data.
unmarshall(byte[]) for the same input byte array must match when
compared using the Object.equals(Object) method.
ExternalCache documentation.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
marshall(T obj)
Deprecated.
Responsible for converting a object into an array of bytes.
|
default byte[] |
marshallToBytes(T t)
Deprecated.
|
T |
unmarshall(byte[] raw)
Deprecated.
Responsible for converting an array of bytes into an object.
|
default T |
unmarshallFrom(byte[] bytes)
Deprecated.
|
byte[] marshall(T obj) throws MarshallerException
obj - the object to be converted.MarshallerException - if unable to perform the conversionT unmarshall(byte[] raw) throws MarshallerException
Object.equals(Object) method.raw - the array of bytes to be converted.MarshallerException - if unable to perform the conversiondefault byte[] marshallToBytes(T t) throws com.atlassian.marshalling.api.MarshallingException
marshallToBytes in interface com.atlassian.marshalling.api.Marshaller<T>com.atlassian.marshalling.api.MarshallingExceptionCopyright © 2019 Atlassian. All rights reserved.