net.spy.memcached.transcoders
Class IntegerTranscoder

java.lang.Object
  extended by net.spy.memcached.compat.SpyObject
      extended by net.spy.memcached.transcoders.IntegerTranscoder
All Implemented Interfaces:
Transcoder<Integer>

public final class IntegerTranscoder
extends SpyObject
implements Transcoder<Integer>

Transcoder that serializes and unserializes longs.


Constructor Summary
IntegerTranscoder()
           
 
Method Summary
 boolean asyncDecode(CachedData d)
          Should the transcoder be run asyncronously.
 Integer decode(CachedData d)
          Decode the cached object into the object it represents.
 CachedData encode(Integer l)
          Encode the given object for storage.
 int getMaxSize()
          Get the maximum size of objects handled by this transcoder.
 
Methods inherited from class net.spy.memcached.compat.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerTranscoder

public IntegerTranscoder()
Method Detail

asyncDecode

public boolean asyncDecode(CachedData d)
Description copied from interface: Transcoder
Should the transcoder be run asyncronously.

Specified by:
asyncDecode in interface Transcoder<Integer>
Returns:
True if the CachedData should be decoded Asyncronously

encode

public CachedData encode(Integer l)
Description copied from interface: Transcoder
Encode the given object for storage.

Specified by:
encode in interface Transcoder<Integer>
Parameters:
l - the object
Returns:
the CachedData representing what should be sent

decode

public Integer decode(CachedData d)
Description copied from interface: Transcoder
Decode the cached object into the object it represents.

Specified by:
decode in interface Transcoder<Integer>
Parameters:
d - the data
Returns:
the return value

getMaxSize

public int getMaxSize()
Description copied from interface: Transcoder
Get the maximum size of objects handled by this transcoder.

Specified by:
getMaxSize in interface Transcoder<Integer>