net.spy.memcached.transcoders
Class LongTranscoder

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.memcached.transcoders.LongTranscoder
All Implemented Interfaces:
Transcoder<java.lang.Long>

public final class LongTranscoder
extends net.spy.SpyObject
implements Transcoder<java.lang.Long>

Transcoder that serializes and unserializes longs.


Constructor Summary
LongTranscoder()
           
 
Method Summary
 java.lang.Long decode(CachedData d)
          Decode the cached object into the object it represents.
 CachedData encode(java.lang.Long l)
          Encode the given object for storage.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongTranscoder

public LongTranscoder()
Method Detail

encode

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

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

decode

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

Specified by:
decode in interface Transcoder<java.lang.Long>
Parameters:
d - the data
Returns:
the return value