Interface Transcoder<T>

All Known Implementing Classes:
IntegerTranscoder, LongTranscoder, SerializingTranscoder, WhalinTranscoder, WhalinV1Transcoder

public interface Transcoder<T>
Transcoder is an interface for classes that convert between byte arrays and objects for storage in the cache.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Should the transcoder be run asyncronously.
    Decode the cached object into the object it represents.
    encode(T o)
    Encode the given object for storage.
    int
    Get the maximum size of objects handled by this transcoder.
  • Method Details

    • asyncDecode

      boolean asyncDecode(CachedData d)
      Should the transcoder be run asyncronously.
      Returns:
      True if the CachedData should be decoded Asyncronously
    • encode

      CachedData encode(T o)
      Encode the given object for storage.
      Parameters:
      o - the object
      Returns:
      the CachedData representing what should be sent
    • decode

      T decode(CachedData d)
      Decode the cached object into the object it represents.
      Parameters:
      d - the data
      Returns:
      the return value
    • getMaxSize

      int getMaxSize()
      Get the maximum size of objects handled by this transcoder.