public abstract class AbstractTransientStore extends Object implements TransientStore
TransientStore
implementation.Constructor and Description |
---|
AbstractTransientStore() |
Modifier and Type | Method and Description |
---|---|
void |
canDelete(String key)
Informs the Store that the entry can be deleted if TTL or GC parameters requires to do some cleanup
|
void |
doGC()
Runs the Garbage Collecting to delete the Filesystem resources that may correspond
to cache entries that were removed
|
StorageEntry |
get(String key)
Retrieve a new entry inside the Store
|
abstract Class<? extends Cache> |
getCacheImplClass() |
File |
getCachingDirectory(String key) |
TransientStoreConfig |
getConfig()
Returns the Store configuration
|
Cache |
getL1Cache() |
Cache |
getL2Cache() |
abstract long |
getStorageSize() |
int |
getStorageSizeMB()
Return the size of the disk storage used
|
void |
init(TransientStoreConfig config)
Initialize the store from the configuration
|
void |
put(StorageEntry entry)
Add a new entry in the Store
|
void |
remove(String key)
Remove an entry from the Store
|
void |
removeAll()
Deletes all entries inside the Store
|
void |
shutdown() |
public void init(TransientStoreConfig config)
TransientStore
init
in interface TransientStore
public void shutdown()
shutdown
in interface TransientStore
public abstract long getStorageSize()
public Cache getL1Cache()
public Cache getL2Cache()
public void put(StorageEntry entry) throws IOException
TransientStore
put
in interface TransientStore
IOException
public StorageEntry get(String key) throws IOException
TransientStore
get
in interface TransientStore
StorageEntry
or nullIOException
public void remove(String key) throws IOException
TransientStore
remove
in interface TransientStore
IOException
public void canDelete(String key) throws IOException
TransientStore
canDelete
in interface TransientStore
IOException
public void removeAll() throws IOException
TransientStore
removeAll
in interface TransientStore
IOException
- *public TransientStoreConfig getConfig()
TransientStore
getConfig
in interface TransientStore
TransientStoreConfig
public int getStorageSizeMB()
TransientStore
getStorageSizeMB
in interface TransientStore
public void doGC()
TransientStore
doGC
in interface TransientStore
Copyright © 2015 Nuxeo SA. All rights reserved.