Class LongTranscoder

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

public final class LongTranscoder extends SpyObject implements Transcoder<Long>
Transcoder that serializes and unserializes longs.
  • Field Details

  • Constructor Details

    • LongTranscoder

      public LongTranscoder()
  • Method Details

    • asyncDecode

      public boolean asyncDecode(CachedData d)
      Description copied from interface: Transcoder
      Should the transcoder be run asyncronously.
      Specified by:
      asyncDecode in interface Transcoder<Long>
      Returns:
      True if the CachedData should be decoded Asyncronously
    • encode

      public CachedData encode(Long l)
      Description copied from interface: Transcoder
      Encode the given object for storage.
      Specified by:
      encode in interface Transcoder<Long>
      Parameters:
      l - the object
      Returns:
      the CachedData representing what should be sent
    • decode

      public Long decode(CachedData d)
      Description copied from interface: Transcoder
      Decode the cached object into the object it represents.
      Specified by:
      decode in interface Transcoder<Long>
      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<Long>