Package overit.geocall.cache
Class RawExtractor
java.lang.Object
overit.geocall.cache.RawExtractor
- All Implemented Interfaces:
Serializable,Entry<byte[],byte[]>
Class that allows an entry to be extracted from the cache exactly as it was stored.
Loading is not supported, so you can only use this class to retrieve items that are already present in the cache.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRawExtractor(String key) Creates a RawExtractor for the entry linked to the passed keyRawExtractor(String key, String view) Creates a RawExtractor for the entry linked to the passed key and view -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compose(byte[] bb) The method for obtaining the composed instance of the object.byte[]fromRaw(byte[] bb) Create the instance of the real entry value by deserializing the passed bytes arraygetKey()Defines the name of a cacheable objectgetView()Defines the name of a view for the cacheable objectbyte[]load()The method for obtaining the real value of the entrybyte[]toRaw(byte[] bb) Serialize the real value of the entry into a bytes array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.cache.Entry
getCharset, getClusterTtl, getReadTtl, getStoreTtl
-
Constructor Details
-
RawExtractor
Creates a RawExtractor for the entry linked to the passed key- Parameters:
key- the name of a cacheable object
-
RawExtractor
Creates a RawExtractor for the entry linked to the passed key and view- Parameters:
key- the name of a cacheable objectview- the name of the view for the cacheable object
-
-
Method Details
-
getKey
Description copied from interface:EntryDefines the name of a cacheable object -
getView
Description copied from interface:EntryDefines the name of a view for the cacheable object -
load
public byte[] load()Description copied from interface:EntryThe method for obtaining the real value of the entry -
compose
public byte[] compose(byte[] bb) Description copied from interface:EntryThe method for obtaining the composed instance of the object. This method allows the real instance of the object to be aggregated with other information, such as the composition of a system configuration with the default one- Specified by:
composein interfaceEntry<byte[],byte[]> - Parameters:
bb- the real instance of the object- Returns:
- the composed instance of the object. This method must be used after the invocation of the
Entry.load()method when the cache doesn't contain a version for this entry.
-
fromRaw
public byte[] fromRaw(byte[] bb) Description copied from interface:EntryCreate the instance of the real entry value by deserializing the passed bytes array -
toRaw
public byte[] toRaw(byte[] bb) Description copied from interface:EntrySerialize the real value of the entry into a bytes array.
-