Interface WriteCache


  • @Beta
    public interface WriteCache
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void copyFromPrevious​(java.lang.String key)
      Copy a cached entry from the previous cache to the new one.
      void write​(java.lang.String key, byte[] data)
      Save a new entry in the cache.
      void write​(java.lang.String key, java.io.InputStream data)
      Save a new entry in the cache.
    • Method Detail

      • write

        void write​(java.lang.String key,
                   java.io.InputStream data)
        Save a new entry in the cache. The stream will be consumed immediately.
        Throws:
        java.lang.IllegalArgumentException - if the cache already contains the key
      • write

        void write​(java.lang.String key,
                   byte[] data)
        Save a new entry in the cache.
        Throws:
        java.lang.IllegalArgumentException - if the cache already contains the key
      • copyFromPrevious

        void copyFromPrevious​(java.lang.String key)
        Copy a cached entry from the previous cache to the new one.
        Throws:
        java.lang.IllegalArgumentException - if the previous cache doesn't contain given key or if this cache already contains the key