java.lang.Object | |
↳ | com.facebook.cache.disk.DynamicDefaultDiskStorage |
A supplier of a DiskStorage concrete implementation.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DynamicDefaultDiskStorage(int version, Supplier<File> baseDirectoryPathSupplier, String baseDirectoryName, CacheErrorLogger cacheErrorLogger) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
clearAll()
Clear all contents of the storage
| ||||||||||
boolean |
contains(String resourceId, Object debugInfo)
Does a resource with this name exist?
| ||||||||||
DiskStorage.DiskDumpInfo | getDumpInfo() | ||||||||||
Collection<DiskStorage.Entry> |
getEntries()
Get all entries currently in the storage
| ||||||||||
BinaryResource |
getResource(String resourceId, Object debugInfo)
Get the resource with the specified name
| ||||||||||
String |
getStorageName()
Get the storage's name, which should be unique
| ||||||||||
DiskStorage.Inserter |
insert(String resourceId, Object debugInfo)
Creates a temporary resource for writing content.
| ||||||||||
boolean |
isEnabled()
is this storage enabled?
| ||||||||||
boolean |
isExternal()
is this storage external?
| ||||||||||
void | purgeUnexpectedResources() | ||||||||||
long |
remove(DiskStorage.Entry entry)
Remove the resource represented by the entry
| ||||||||||
long |
remove(String resourceId)
Remove the resource with specified id
| ||||||||||
boolean |
touch(String resourceId, Object debugInfo)
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
| |||||||||||
From interface
com.facebook.cache.disk.DiskStorage
|
Clear all contents of the storage
IOException |
---|
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 |
IOException |
---|
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 |
---|
IOException |
---|
Remove the resource with specified id
IOException |
---|
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 |
IOException |
---|