com.facebook.cache.disk.DiskStorage |
Known Indirect Subclasses |
Storage for files in the cache. Responsible for maintaining state (count, size, watch file existence, reachability)
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | DiskStorage.DiskDumpInfo | ||||||||||
class | DiskStorage.DiskDumpInfoEntry | ||||||||||
interface | DiskStorage.Entry | ||||||||||
interface | DiskStorage.Inserter | This is a builder-like interface returned when calling insert. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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
|
Clear all contents of the storage
IOException | |
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 | for unexpected behavior. |
---|
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 | on errors during this operation |
---|
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 |
---|