Package com.bumptech.glide.disklrucache
Class DiskLruCache.Editor
- java.lang.Object
-
- com.bumptech.glide.disklrucache.DiskLruCache.Editor
-
- Enclosing class:
- DiskLruCache
public final class DiskLruCache.Editor extends java.lang.ObjectEdits the values for an entry.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts this edit.voidabortUnlessCommitted()voidcommit()Commits this edit so it is visible to readers.java.io.FilegetFile(int index)java.lang.StringgetString(int index)Returns the last committed value as a string, or null if no value has been committed.voidset(int index, java.lang.String value)Sets the value atindextovalue.
-
-
-
Method Detail
-
getString
public java.lang.String getString(int index) throws java.io.IOExceptionReturns the last committed value as a string, or null if no value has been committed.- Throws:
java.io.IOException
-
getFile
public java.io.File getFile(int index) throws java.io.IOException- Throws:
java.io.IOException
-
set
public void set(int index, java.lang.String value) throws java.io.IOExceptionSets the value atindextovalue.- Throws:
java.io.IOException
-
commit
public void commit() throws java.io.IOExceptionCommits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key.- Throws:
java.io.IOException
-
abort
public void abort() throws java.io.IOExceptionAborts this edit. This releases the edit lock so another edit may be started on the same key.- Throws:
java.io.IOException
-
abortUnlessCommitted
public void abortUnlessCommitted()
-
-