public class NoOpBackingStore<K extends Serializable,V extends Serializable> extends BackingStore<K,V>
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called when the store is no longer needed.
|
BackingStoreFactory |
getBackingStoreFactory() |
protected void |
initialize(BackingStoreConfiguration<K,V> conf) |
V |
load(K key,
String version)
Load and return the data for the given id.
|
void |
remove(K key)
Remove the association for the id.
|
int |
removeExpired()
Remove expired entries
|
String |
save(K key,
V value,
boolean isNew)
Save the value whose key is id.
|
int |
size()
Get the current size of the store
|
String |
updateTimestamp(K key,
String version,
Long accessTime)
Recomended way is to just do a save(k, v)
|
close, createObjectInputStream, createObjectOutputStream, getBackingStoreConfiguration, removeExpired, updateTimestamp
protected void initialize(BackingStoreConfiguration<K,V> conf) throws BackingStoreException
initialize
in class BackingStore<K extends Serializable,V extends Serializable>
BackingStoreException
public BackingStoreFactory getBackingStoreFactory()
getBackingStoreFactory
in class BackingStore<K extends Serializable,V extends Serializable>
public V load(K key, String version) throws BackingStoreException
BackingStore
save()
method.load
in class BackingStore<K extends Serializable,V extends Serializable>
key
- the key whose value must be returnedBackingStoreException
- if the underlying store implementation encounters any
exceptionpublic String save(K key, V value, boolean isNew) throws BackingStoreException
BackingStore
save
in class BackingStore<K extends Serializable,V extends Serializable>
key
- the idvalue
- The Metadata to be storedBackingStoreException
- if the underlying store implementation encounters any
exceptionpublic void remove(K key) throws BackingStoreException
BackingStore
load(id)
must return
null. In addition, any association between id
and
container extra params must also be removed.remove
in class BackingStore<K extends Serializable,V extends Serializable>
key
- the id of the MetadataBackingStoreException
- if the underlying store implementation encounters any
exceptionpublic String updateTimestamp(K key, String version, Long accessTime) throws BackingStoreException
BackingStore
updateTimestamp
in class BackingStore<K extends Serializable,V extends Serializable>
BackingStoreException
public int removeExpired() throws BackingStoreException
BackingStore
removeExpired
in class BackingStore<K extends Serializable,V extends Serializable>
BackingStoreException
public int size() throws BackingStoreException
BackingStore
size
in class BackingStore<K extends Serializable,V extends Serializable>
BackingStoreException
- if the underlying store implementation encounters any
exceptionpublic void destroy() throws BackingStoreException
BackingStore
destroy
in class BackingStore<K extends Serializable,V extends Serializable>
BackingStoreException
Copyright © 2015 Oracle Corporation. All rights reserved.