public interface CouchDbInstance
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIfDbExists(DbPath db) |
boolean |
checkIfDbExists(String path) |
CouchDbConnector |
createConnector(String path,
boolean createIfNotExists) |
void |
createDatabase(DbPath path) |
void |
createDatabase(String path) |
String |
deleteConfiguration(String section,
String key)
Delete the configuration key in the specified section
|
void |
deleteDatabase(String path) |
Collection<ActiveTask> |
getActiveTasks() |
List<String> |
getAllDatabases() |
<T> T |
getConfiguration(Class<T> c)
Get the full configuration of this instance
|
<T> T |
getConfiguration(Class<T> c,
String section)
Get the configuration of this instance within the specified section
|
<T> T |
getConfiguration(Class<T> c,
String section,
String key)
Get the configuration of this instance for this specific section and key
|
String |
getConfiguration(String section,
String key)
Convenience method to get specific configuration item
|
HttpClient |
getConnection()
Convenience method for accessing the underlying HttpClient.
|
CouchDbConnector |
getReplicatorConnector()
Returns the Couch _replicator database
|
ReplicationStatus |
replicate(ReplicationCommand cmd) |
String |
setConfiguration(String section,
String key,
String value)
Update the configuration key in the specified section with the specified value
|
List<String> getAllDatabases()
boolean checkIfDbExists(DbPath db)
db - boolean checkIfDbExists(String path)
void createDatabase(DbPath path)
void createDatabase(String path)
void deleteDatabase(String path)
CouchDbConnector createConnector(String path, boolean createIfNotExists)
path - createIfNotExists - CouchDbConnector getReplicatorConnector()
HttpClient getConnection()
ReplicationStatus replicate(ReplicationCommand cmd)
<T> T getConfiguration(Class<T> c)
c - the type to return the configuration in (Map, JsonNode, POJO)<T> T getConfiguration(Class<T> c, String section)
c - the type to return the configuration in (Map, JsonNode, POJO)section - <T> T getConfiguration(Class<T> c, String section, String key)
c - the type to return the configuration in (Map, JsonNode, POJO)section - key - String getConfiguration(String section, String key)
section - key - String setConfiguration(String section, String key, String value)
section - key - value - the value to set (all config values are Strings in CouchDB)String deleteConfiguration(String section, String key)
section - key - Collection<ActiveTask> getActiveTasks()
Copyright © 2013. All Rights Reserved.