Package net.spy.memcached.transcoders
Class LongTranscoder
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.transcoders.LongTranscoder
-
- All Implemented Interfaces:
Transcoder<java.lang.Long>
public final class LongTranscoder extends SpyObject implements Transcoder<java.lang.Long>
Transcoder that serializes and unserializes longs.
-
-
Field Summary
Fields Modifier and Type Field Description private static intFLAGSprivate TranscoderUtilstu
-
Constructor Summary
Constructors Constructor Description LongTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasyncDecode(CachedData d)Should the transcoder be run asyncronously.java.lang.Longdecode(CachedData d)Decode the cached object into the object it represents.CachedDataencode(java.lang.Long l)Encode the given object for storage.intgetMaxSize()Get the maximum size of objects handled by this transcoder.
-
-
-
Field Detail
-
FLAGS
private static final int FLAGS
- See Also:
- Constant Field Values
-
tu
private final TranscoderUtils tu
-
-
Method Detail
-
asyncDecode
public boolean asyncDecode(CachedData d)
Description copied from interface:TranscoderShould the transcoder be run asyncronously.- Specified by:
asyncDecodein interfaceTranscoder<java.lang.Long>- Returns:
- True if the CachedData should be decoded Asyncronously
-
encode
public CachedData encode(java.lang.Long l)
Description copied from interface:TranscoderEncode the given object for storage.- Specified by:
encodein interfaceTranscoder<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:TranscoderDecode the cached object into the object it represents.- Specified by:
decodein interfaceTranscoder<java.lang.Long>- Parameters:
d- the data- Returns:
- the return value
-
getMaxSize
public int getMaxSize()
Description copied from interface:TranscoderGet the maximum size of objects handled by this transcoder.- Specified by:
getMaxSizein interfaceTranscoder<java.lang.Long>
-
-