public class CouchDBPersistence extends Persistence
| Modifier and Type | Field and Description |
|---|---|
protected org.ektorp.CouchDbConnector |
couchDbConnector |
protected org.ektorp.CouchDbInstance |
couchDbInstance |
protected String |
dbName |
protected static String |
DEFAULT_HOST |
protected String |
host |
protected static String |
HOST |
protected String |
password |
protected static String |
PASSWORD |
protected int |
port |
protected static String |
PORT |
protected String |
username |
protected static String |
USERNAME |
fallback, persistence| Modifier | Constructor and Description |
|---|---|
protected |
CouchDBPersistence() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
createItem(org.codehaus.jackson.JsonNode node,
String id) |
protected org.ektorp.http.HttpClient |
initHttpClient(String uri,
int port,
String username,
String password) |
static UsageRecord |
jsonNodeToUsageRecord(org.codehaus.jackson.JsonNode jsonNode) |
protected void |
prepareConnection()
Prepare the connection to persistence.
|
protected org.ektorp.ViewResult |
query(org.ektorp.ViewQuery query) |
protected void |
reallyAccount(UsageRecord usageRecord)
This method contains the code to save the
#UsageRecord |
static org.codehaus.jackson.JsonNode |
usageRecordToJsonNode(UsageRecord usageRecord) |
account, createTestUsageRecord, getInstance, init, setFallbackLocationprotected org.ektorp.CouchDbInstance couchDbInstance
protected org.ektorp.CouchDbConnector couchDbConnector
protected static final String HOST
protected static final String DEFAULT_HOST
protected static final String PORT
protected static final String USERNAME
protected static final String PASSWORD
protected String host
protected int port
protected String username
protected String password
protected String dbName
protected org.ektorp.http.HttpClient initHttpClient(String uri, int port, String username, String password)
protected org.ektorp.ViewResult query(org.ektorp.ViewQuery query)
public void close()
throws Exception
close in class PersistenceExceptionprotected void prepareConnection()
throws Exception
prepareConnection in class PersistenceException - if failsprotected void createItem(org.codehaus.jackson.JsonNode node,
String id)
throws Exception
Exceptionprotected void reallyAccount(UsageRecord usageRecord) throws Exception
#UsageRecordreallyAccount in class PersistenceExceptionpublic static org.codehaus.jackson.JsonNode usageRecordToJsonNode(UsageRecord usageRecord) throws Exception
Exceptionpublic static UsageRecord jsonNodeToUsageRecord(org.codehaus.jackson.JsonNode jsonNode) throws Exception
ExceptionCopyright © 2015. All Rights Reserved.