org.ektorp.impl
Class StdCouchDbInstance

java.lang.Object
  extended by org.ektorp.impl.StdCouchDbInstance
All Implemented Interfaces:
CouchDbInstance

public class StdCouchDbInstance
extends Object
implements CouchDbInstance

Author:
henrik lundgren

Constructor Summary
StdCouchDbInstance(HttpClient client)
           
StdCouchDbInstance(HttpClient client, ObjectMapperFactory of)
           
 
Method Summary
 boolean checkIfDbExists(DbPath db)
           
 CouchDbConnector createConnector(String path, boolean createIfNotExists)
           
 void createDatabase(DbPath db)
           
 void createDatabase(String path)
           
 void deleteDatabase(String path)
           
 List<String> getAllDatabases()
           
 HttpClient getConnection()
          Convenience method for accessing the underlying HttpClient.
 ReplicationStatus replicate(ReplicationCommand cmd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdCouchDbInstance

public StdCouchDbInstance(HttpClient client)

StdCouchDbInstance

public StdCouchDbInstance(HttpClient client,
                          ObjectMapperFactory of)
Method Detail

createDatabase

public void createDatabase(String path)
Specified by:
createDatabase in interface CouchDbInstance

createDatabase

public void createDatabase(DbPath db)
Specified by:
createDatabase in interface CouchDbInstance

deleteDatabase

public void deleteDatabase(String path)
Specified by:
deleteDatabase in interface CouchDbInstance

checkIfDbExists

public boolean checkIfDbExists(DbPath db)
Specified by:
checkIfDbExists in interface CouchDbInstance
Returns:
true if the database exists.

getAllDatabases

public List<String> getAllDatabases()
Specified by:
getAllDatabases in interface CouchDbInstance
Returns:
the names of all databases residing in this instance.

replicate

public ReplicationStatus replicate(ReplicationCommand cmd)
Specified by:
replicate in interface CouchDbInstance

getConnection

public HttpClient getConnection()
Description copied from interface: CouchDbInstance
Convenience method for accessing the underlying HttpClient. Preferably used wrapped in a org.ektorp.http.RestTemplate.

Specified by:
getConnection in interface CouchDbInstance
Returns:

createConnector

public CouchDbConnector createConnector(String path,
                                        boolean createIfNotExists)
Specified by:
createConnector in interface CouchDbInstance
Returns:


Copyright © 2011. All Rights Reserved.