public class QueuedStorage extends Object implements Storage
| Modifier and Type | Field and Description |
|---|---|
protected Storage |
delegate |
protected ExecutorService |
executor |
protected ExecutorService |
fileExecutor |
protected boolean |
isBackingStorageInProxy |
protected boolean |
isTimedStatements |
protected com.redhat.thermostat.shared.perflog.PerformanceLogFormatter |
perfLogFormatter |
| Constructor and Description |
|---|
QueuedStorage(Storage delegate) |
QueuedStorage(Storage delegate,
com.redhat.thermostat.shared.perflog.PerformanceLogFormatter perfLogFormatter) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection()
Returns the Connection object that may be used to manage connections
to this Storage.
|
InputStream |
loadFile(String filename)
Load the file with the given name and return the data as an InputStream.
|
<T extends Pojo> |
prepareStatement(StatementDescriptor<T> desc)
Prepares the given statement for execution.
|
void |
purge(String agentId)
Drop all data related to the specified agent.
|
void |
registerCategory(Category<?> category)
Register the category into the Storage.
|
void |
saveFile(String filename,
InputStream data)
Save the contents of the input stream as the given name.
|
void |
shutdown()
Shutdown the storage
|
protected final boolean isBackingStorageInProxy
protected final boolean isTimedStatements
protected final com.redhat.thermostat.shared.perflog.PerformanceLogFormatter perfLogFormatter
protected final Storage delegate
protected final ExecutorService executor
protected final ExecutorService fileExecutor
public QueuedStorage(Storage delegate)
public QueuedStorage(Storage delegate, com.redhat.thermostat.shared.perflog.PerformanceLogFormatter perfLogFormatter)
public void purge(String agentId)
Storagepublic void saveFile(String filename, InputStream data)
Storagepublic InputStream loadFile(String filename)
StorageloadFile in interface StorageInputStream or null if not found.public void registerCategory(Category<?> category)
StorageregisterCategory in interface Storagepublic <T extends Pojo> PreparedStatement<T> prepareStatement(StatementDescriptor<T> desc) throws DescriptorParsingException
StorageprepareStatement in interface Storagedesc - The statement descriptor to prepare.PreparedStatement if the given statement descriptor was
known and did not fail to parse.DescriptorParsingException - If the descriptor string failed to parse.IllegalDescriptorException - If storage refused to prepare a statement descriptor for
security reasons.public Connection getConnection()
StoragegetConnection in interface StorageCopyright © 2015. All rights reserved.