public class QueuedStorage extends Object implements Storage
Modifier and Type | Field and Description |
---|---|
protected Storage |
delegate |
protected ExecutorService |
executor |
protected ExecutorService |
fileExecutor |
Constructor and Description |
---|
QueuedStorage(Storage delegate) |
Modifier and Type | Method and Description |
---|---|
Add |
createAdd(Category<?> into) |
<T extends Pojo> |
createQuery(Category<T> category) |
Remove |
createRemove() |
Replace |
createReplace(Category<?> into) |
Update |
createUpdate(Category<?> category) |
String |
getAgentId() |
Connection |
getConnection()
Returns the Connection object that may be used to manage connections
to this Storage.
|
long |
getCount(Category category) |
InputStream |
loadFile(String filename) |
void |
purge(String agentId)
Drop all data related to the currently running agent.
|
void |
registerCategory(Category<?> category) |
void |
removePojo(Remove remove) |
void |
saveFile(String filename,
InputStream data) |
void |
setAgentId(UUID id) |
void |
shutdown() |
protected final Storage delegate
protected final ExecutorService executor
protected final ExecutorService fileExecutor
public QueuedStorage(Storage delegate)
public Replace createReplace(Category<?> into)
createReplace
in interface Storage
public void removePojo(Remove remove)
removePojo
in interface Storage
public void purge(String agentId)
Storage
public void saveFile(String filename, InputStream data)
public InputStream loadFile(String filename)
public <T extends Pojo> Query<T> createQuery(Category<T> category)
createQuery
in interface Storage
public Update createUpdate(Category<?> category)
createUpdate
in interface Storage
public Remove createRemove()
createRemove
in interface Storage
public void setAgentId(UUID id)
setAgentId
in interface Storage
public String getAgentId()
getAgentId
in interface Storage
public void registerCategory(Category<?> category)
registerCategory
in interface Storage
public Connection getConnection()
Storage
getConnection
in interface Storage
Copyright © 2013. All rights reserved.