-
@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 Unitcommit()Commit the edit so the changes are visible to readers. abstract DiskCache.SnapshotcommitAndOpenSnapshot()Commit the write and call openSnapshot for this entry atomically. abstract DiskCache.SnapshotcommitAndGet()abstract Unitabort()Abort the edit. abstract PathgetMetadata()Get the metadata file path for this entry. abstract PathgetData()Get the data file path for this entry. -
-
Method Detail
-
commitAndOpenSnapshot
abstract DiskCache.Snapshot commitAndOpenSnapshot()
Commit the write and call openSnapshot for this entry atomically.
-
commitAndGet
@Deprecated(message = Renamed to 'commitAndOpenSnapshot'., replaceWith = @ReplaceWith(imports = {}, expression = commitAndOpenSnapshot())) abstract DiskCache.Snapshot commitAndGet()
-
getMetadata
abstract Path getMetadata()
Get the metadata file path for this entry.
-
getData
abstract Path getData()
Get the data file path for this entry.
-
-
-
-