public class MongoStorage extends Storage
| Modifier and Type | Field and Description |
|---|---|
static String |
SET_MODIFIER |
| Constructor and Description |
|---|
MongoStorage(StartupConfiguration conf) |
| Modifier and Type | Method and Description |
|---|---|
ConnectionKey |
createConnectionKey(Category category) |
Query |
createQuery() |
Remove |
createRemove() |
Update |
createUpdate() |
<T extends Pojo> |
findAllPojos(Query query,
Class<T> resultClass) |
<T extends Pojo> |
findPojo(Query query,
Class<T> resultClass) |
String |
getAgentId() |
Connection |
getConnection() |
long |
getCount(Category category) |
InputStream |
loadFile(String filename) |
void |
purge()
Drop all data related to the currently running agent.
|
void |
putPojo(Category category,
boolean replace,
Pojo pojo) |
void |
removePojo(Remove remove) |
void |
saveFile(String filename,
InputStream data) |
void |
setAgentId(UUID agentId) |
void |
updatePojo(Update update) |
registerCategorypublic static final String SET_MODIFIER
public MongoStorage(StartupConfiguration conf)
public Connection getConnection()
getConnection in class Storagepublic void setAgentId(UUID agentId)
setAgentId in class Storagepublic String getAgentId()
getAgentId in class Storagepublic void updatePojo(Update update)
updatePojo in class Storagepublic void removePojo(Remove remove)
removePojo in class Storagepublic void purge()
Storagepublic ConnectionKey createConnectionKey(Category category)
createConnectionKey in class Storagepublic Query createQuery()
createQuery in class Storagepublic Update createUpdate()
createUpdate in class Storagepublic Remove createRemove()
createRemove in class Storagepublic <T extends Pojo> Cursor<T> findAllPojos(Query query, Class<T> resultClass)
findAllPojos in class Storagepublic void saveFile(String filename, InputStream data)
public InputStream loadFile(String filename)
Copyright © 2012. All Rights Reserved.