Package net.spy.memcached.transcoders
Interface Transcoder<T>
- All Known Implementing Classes:
IntegerTranscoder
,LongTranscoder
,SerializingTranscoder
,WhalinTranscoder
,WhalinV1Transcoder
public interface Transcoder<T>
Transcoder is an interface for classes that convert between byte arrays and
objects for storage in the cache.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Should the transcoder be run asyncronously.decode
(CachedData d) Decode the cached object into the object it represents.Encode the given object for storage.int
Get the maximum size of objects handled by this transcoder.
-
Method Details
-
asyncDecode
Should the transcoder be run asyncronously.- Returns:
- True if the CachedData should be decoded Asyncronously
-
encode
Encode the given object for storage.- Parameters:
o
- the object- Returns:
- the CachedData representing what should be sent
-
decode
Decode the cached object into the object it represents.- Parameters:
d
- the data- Returns:
- the return value
-
getMaxSize
int getMaxSize()Get the maximum size of objects handled by this transcoder.
-