docs/javadoc/reference/com/facebook/cache/disk/DefaultDiskStorage.html
|
|
Summary: Nested Classes | Ctors | Methods | Inherited Methods | [Expand All]
public class
extends Object
implements DiskStorage
| java.lang.Object | | ↳ | com.facebook.cache.disk.DefaultDiskStorage |
The default disk storage implementation. Subsumes both 'simple' and 'sharded' implementations via a new SubdirectorySupplier.
| Nested Classes |
|---|
| @interface |
| Public Constructors |
|---|
| Instantiates a ShardedDiskStorage that will use the directory to save a map between keys and files. |
| Public Methods |
|---|
| void |
| Clear all contents of the storage |
| boolean |
| Does a resource with this name exist? |
| DiskStorage.DiskDumpInfo |
| List<DiskStorage.Entry> |
| Get all entries currently in the storage |
| BinaryResource |
| Get the resource with the specified name |
| String |
| Get the storage's name, which should be unique |
| DiskStorage.Inserter |
| Creates a temporary resource for writing content. |
| boolean |
| is this storage enabled? |
| boolean |
| is this storage external? |
| void |
| long |
| Remove the resource represented by the entry |
| long |
| Remove the resource with specified id |
| boolean |
| Does a resource with this name exist? If so, update the last-accessed time for the resource |
| [Expand] Inherited Methods | | --- | | From class java.lang.Object
| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |
| | From interface com.facebook.cache.disk.DiskStorage
| abstract void | clearAll() Clear all contents of the storage | | abstract boolean | contains(String resourceId, Object debugInfo) Does a resource with this name exist? | | abstract DiskStorage.DiskDumpInfo | getDumpInfo() | | abstract Collection<DiskStorage.Entry> | getEntries() Get all entries currently in the storage | | abstract BinaryResource | getResource(String resourceId, Object debugInfo) Get the resource with the specified name | | abstract String | getStorageName() Get the storage's name, which should be unique | | abstract DiskStorage.Inserter | insert(String resourceId, Object debugInfo) Creates a temporary resource for writing content. | | abstract boolean | isEnabled() is this storage enabled? | | abstract boolean | isExternal() is this storage external? | | abstract void | purgeUnexpectedResources() | | abstract long | remove(DiskStorage.Entry entry) Remove the resource represented by the entry | | abstract long | remove(String resourceId) Remove the resource with specified id | | abstract boolean | touch(String resourceId, Object debugInfo) Does a resource with this name exist? If so, update the last-accessed time for the resource |
|
Instantiates a ShardedDiskStorage that will use the directory to save a map between keys and files. The version is very important if clients change the format saved in those files. ShardedDiskStorage will assure that files saved with different version will be never used and eventually removed.
| rootDirectory | root directory to create all content under | | version | version of the format used in the files. If passed a different version files saved with the previous value will not be read and will be purged eventually. | | cacheErrorLogger | logger for various events |
Clear all contents of the storage
Does a resource with this name exist?
| resourceId | id of the resource | | debugInfo | helper object for debugging |
| IOException | |
Get all entries currently in the storage
| IOException | |
Get the resource with the specified name
| resourceId | id of the resource | | debugInfo | helper object for debugging |
Get the storage's name, which should be unique
Creates a temporary resource for writing content. Split from commit() in order to allow concurrent writing of cache entries. This entry will not be available to cache clients until commit() is called passing in the resource returned from this method.
| resourceId | id of the resource | | debugInfo | helper object for debugging |
| IOException | |
is this storage enabled?
is this storage external?
Remove the resource represented by the entry
| entry | entry of the resource to delete |
Remove the resource with specified id
Does a resource with this name exist? If so, update the last-accessed time for the resource
| resourceId | id of the resource | | debugInfo | helper object for debugging |
+Generated by Doclava. +