Interface Cacheable


  • public interface Cacheable
    Used to identify objects that can cache their resume state or data
    • Method Detail

      • 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