public abstract class PropertyStorageAdapter extends Object
| Constructor and Description | 
|---|
| PropertyStorageAdapter() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected byte[] | base64Decode(String s)Helper method for decoding a base64-encoded string to a byte array. | 
| protected String | base64Encode(byte[] bytes)Helper method for encoding a byte array to a base64-encoded string. | 
| protected Object | deserialize(byte[] data)Helper method for deserializing a byte array to a serializable object. | 
| abstract Object | fromSpace(Object value)Triggered when a property value arrives from the space and is about to be injected in the user's object. | 
| String | getName()Returns a name used for display in monitoring tools. | 
| Class<?> | getStorageClass()Returns the class of the values which will be stored in the space. | 
| protected byte[] | serialize(Object value)Helper method for serializing a serializable object to a byte array. | 
| boolean | supportsEqualsMatching()Indicates whether equality matching is supported. | 
| boolean | supportsOrderedMatching()Indicates whether ordered matching is supported. | 
| protected BinaryWrapper | toBinaryWrapper(byte[] bytes)Default factory for wrapping a byte array in a container for space storage. | 
| abstract Object | toSpace(Object value)Triggered when a property value is retrieved from the user's object and is about to be sent to the space. | 
| protected byte[] | unwrapBinary(Object spaceValue)Helper method for unwrapping a byte array from its container object. | 
| protected Object | unzip(byte[] data)Helper method for uncompressing and deserializing a byte array to a serializable object. | 
| boolean | useBase64Wrapper()Determines if binary content should be stored in the space as a string in base64 encoding. | 
| protected Object | wrapBinary(byte[] data)Helper method for wrapping a byte array in a container object for space storage. | 
| protected byte[] | zip(Object value)Helper method for serializing and compressing a serializable object to a byte array. | 
public abstract Object toSpace(Object value) throws IOException
value - The original property valueIOException - Thrown when processing the property value fails.public abstract Object fromSpace(Object value) throws IOException, ClassNotFoundException
value - The value which was stored in the spaceIOException - Thrown when processing the property value fails.ClassNotFoundException - Thrown when processing the property value fails due to a class loading issue.public String getName()
public Class<?> getStorageClass()
public boolean supportsEqualsMatching()
public boolean supportsOrderedMatching()
public boolean useBase64Wrapper()
protected byte[] serialize(Object value) throws IOException
IOExceptionprotected Object deserialize(byte[] data) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionprotected byte[] zip(Object value) throws IOException
IOExceptionprotected Object unzip(byte[] data) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionprotected Object wrapBinary(byte[] data)
protected byte[] unwrapBinary(Object spaceValue)
protected BinaryWrapper toBinaryWrapper(byte[] bytes)
protected String base64Encode(byte[] bytes)
protected byte[] base64Decode(String s)
Copyright © GigaSpaces.