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) |
registerCategory
public static final String SET_MODIFIER
public MongoStorage(StartupConfiguration conf)
public Connection getConnection()
getConnection
in class Storage
public void setAgentId(UUID agentId)
setAgentId
in class Storage
public String getAgentId()
getAgentId
in class Storage
public void updatePojo(Update update)
updatePojo
in class Storage
public void removePojo(Remove remove)
removePojo
in class Storage
public void purge()
Storage
public ConnectionKey createConnectionKey(Category category)
createConnectionKey
in class Storage
public Query createQuery()
createQuery
in class Storage
public Update createUpdate()
createUpdate
in class Storage
public Remove createRemove()
createRemove
in class Storage
public <T extends Pojo> Cursor<T> findAllPojos(Query query, Class<T> resultClass)
findAllPojos
in class Storage
public void saveFile(String filename, InputStream data)
public InputStream loadFile(String filename)
Copyright © 2012. All Rights Reserved.