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
 T decode(CachedData d)
          Decode the cached object into the object it represents.
 CachedData encode(T o)
          Encode the given object for storage.
 

Method Detail

encode

CachedData encode(T o)
Encode the given object for storage.

Parameters:
o - the object
Returns:
the CachedData representing what should be sent

decode

T decode(CachedData d)
Decode the cached object into the object it represents.

Parameters:
d - the data
Returns:
the return value