public class FilePersistentObjectStore<K extends Serializable,V extends Cacheable<K>> extends Object implements PersistentObjectStore<K,V>
Constructor and Description |
---|
FilePersistentObjectStore(PassivationManager<K,V> passivationManager,
String directoryName,
int subDirectoryCount) |
Modifier and Type | Method and Description |
---|---|
protected File |
getFile(K key) |
int |
getStoreSize() |
V |
load(K key)
Load the object from storage.
|
protected static void |
safeClose(Closeable closeable) |
void |
start()
Perform any initialization work.
|
void |
stop()
Perform any shutdown work.
|
void |
store(V obj)
Store the object into storage.
|
public FilePersistentObjectStore(PassivationManager<K,V> passivationManager, String directoryName, int subDirectoryCount)
public V load(K key)
PersistentObjectStore
load
in interface PersistentObjectStore<K extends Serializable,V extends Cacheable<K>>
key
- the object identifier. It is assumed the key represents something meaningful to the object store.public void start()
PersistentObjectStore
start
in interface PersistentObjectStore<K extends Serializable,V extends Cacheable<K>>
public void stop()
PersistentObjectStore
stop
in interface PersistentObjectStore<K extends Serializable,V extends Cacheable<K>>
public void store(V obj)
PersistentObjectStore
store
in interface PersistentObjectStore<K extends Serializable,V extends Cacheable<K>>
obj
- the objectprotected static void safeClose(Closeable closeable)
public int getStoreSize()
getStoreSize
in interface PersistentObjectStore<K extends Serializable,V extends Cacheable<K>>
Copyright © 2013 JBoss by Red Hat. All rights reserved.