Interface CacheResult

  • All Implemented Interfaces:

    
    public interface CacheResult
    
                        

    Represents an item that is retrieved from cache using CacheService

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract InputStream getData() Gets the content of the item that is retrieved from the cache.
      abstract CacheExpiry getExpiry() Gets the expiry of the item that is retrieved from the cache.
      abstract Map<String, String> getMetadata() Gets the metadata of the item that is retrieved from the cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getData

        @Nullable() abstract InputStream getData()

        Gets the content of the item that is retrieved from the cache.

        Returns:

        the content of the item that was cached

      • getExpiry

        @NonNull() abstract CacheExpiry getExpiry()

        Gets the expiry of the item that is retrieved from the cache.

        Returns:

        expiry of the item that was cached

      • getMetadata

        @Nullable() abstract Map<String, String> getMetadata()

        Gets the metadata of the item that is retrieved from the cache. Note that this metadata may also contain additional keys used internally by CacheService to facilitate caching.

        Returns:

        metadata of the item provided when it was cached.