Package net.spy.memcached.transcoders
Class IntegerTranscoder
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.transcoders.IntegerTranscoder
-
- All Implemented Interfaces:
Transcoder<java.lang.Integer>
public final class IntegerTranscoder extends SpyObject implements Transcoder<java.lang.Integer>
Transcoder that serializes and unserializes longs.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FLAGS
private TranscoderUtils
tu
-
Constructor Summary
Constructors Constructor Description IntegerTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
asyncDecode(CachedData d)
Should the transcoder be run asyncronously.java.lang.Integer
decode(CachedData d)
Decode the cached object into the object it represents.CachedData
encode(java.lang.Integer l)
Encode the given object for storage.int
getMaxSize()
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:Transcoder
Should the transcoder be run asyncronously.- Specified by:
asyncDecode
in interfaceTranscoder<java.lang.Integer>
- Returns:
- True if the CachedData should be decoded Asyncronously
-
encode
public CachedData encode(java.lang.Integer l)
Description copied from interface:Transcoder
Encode the given object for storage.- Specified by:
encode
in interfaceTranscoder<java.lang.Integer>
- Parameters:
l
- the object- Returns:
- the CachedData representing what should be sent
-
decode
public java.lang.Integer decode(CachedData d)
Description copied from interface:Transcoder
Decode the cached object into the object it represents.- Specified by:
decode
in interfaceTranscoder<java.lang.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 interfaceTranscoder<java.lang.Integer>
-
-