Package 

Interface DiskCache.Editor


  • @ExperimentalCoilApi() 
    public interface DiskCache.Editor
    
                        

    Edits the values for an entry.

    Calling metadata or data marks that file as dirty so it will be persisted to disk if this editor is committed.

    IMPORTANT: You must only read or modify the contents of metadata or data. Renaming, locking, or other mutating file operations can corrupt the disk cache.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit commit() Commit the edit so the changes are visible to readers.
      abstract DiskCache.Snapshot commitAndOpenSnapshot() Commit the write and call openSnapshot for this entry atomically.
      abstract DiskCache.Snapshot commitAndGet()
      abstract Unit abort() Abort the edit.
      abstract Path getMetadata() Get the metadata file path for this entry.
      abstract Path getData() Get the data file path for this entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait