Interface Cacheable


public interface Cacheable
Used to identify objects that can cache their resume state or data
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The cache fill policy can be used to determine how this cache should be filled with data.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(OffsetKey<?> key, Offset<?> offset)
    Adds an offset key and value to the cache
    Gets the cache in resume adapters and objects that cache their data
    Gets the for this cache instance
    void
    Sets the cache in resume adapters and objects that cache their data
  • Method Details

    • add

      boolean add(OffsetKey<?> key, Offset<?> offset)
      Adds an offset key and value to the cache
      Parameters:
      key - the key to add
      offset - the offset to add
      Returns:
      true if added successfully (i.e.: the cache is not full) or false otherwise
    • setCache

      void setCache(ResumeCache<?> cache)
      Sets the cache in resume adapters and objects that cache their data
      Parameters:
      cache - A resume cache instance
    • getCache

      ResumeCache<?> getCache()
      Gets the cache in resume adapters and objects that cache their data
      Returns:
      A resume cache instance
    • getFillPolicy

      default Cacheable.FillPolicy getFillPolicy()
      Gets the for this cache instance
      Returns:
      the fill policy set for this instance FillPolicy.MAXIMIZING