public class CouchBaseNode extends Object implements Serializable
| Constructor and Description |
|---|
CouchBaseNode(String clusterName,
Integer replicas,
Integer ramQuota,
String scope) |
CouchBaseNode(String nodeIP,
String nodePort,
String clusterName,
Integer replicas,
Integer ramQuota,
String scope) |
CouchBaseNode(String nodeIP,
String nodePort,
String username,
String password,
String clusterName,
Integer replicas,
Integer ramQuota,
String scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIndexTypes(Map<String,String> keysValues)
Given at map of
|
boolean |
checkIfBucketExists()
Checks if the bucket that is defined for the client exists
|
void |
clear()
Recreates the bucket
|
void |
commitMetaIndexToDatabase()
Saves the current state of meta index in the database and overrides the previous contents
|
void |
connectTo(String host,
String port)
Initializes a client for the server located at host:port
|
void |
createCluster(boolean forceCreate)
Creates a cluster by creating a node and adding a node
|
void |
delete()
Deletes the bucket
|
Boolean |
deleteCollection(String collectionID)
Deletes all the documents of the given collection
|
void |
deleteDocuments(List<String> docIDs)
Deletes all the documents with keys given in docIDs param
|
void |
destroy()
Deletes the bucket and then shutdowns
|
boolean |
feedLocator(String locator)
Feeds the index with values taken from a specific locator.
|
String |
getBucketName() |
String |
getDesignDocName() |
Map<String,CouchBaseDataTypesHelper.DataType> |
getKeys() |
MetaIndex |
getMetaIndex() |
org.gcube.indexmanagement.resourceregistry.RRadaptor |
getRradaptor() |
String |
getScope() |
void |
joinCluster(Map<String,String> knownHosts) |
void |
joinCluster(String knownHostIP,
String knownHostPort)
Joins a cluster of a known server
|
void |
loadKeysFromMetaIndex()
Loads the keys from the metaIndex
|
void |
loadMetaFromDatabase()
Loads the meta index from the database and discards current changes
|
String |
query(String queryString)
Executes the queryString and returns the answers at a specific locator.
|
void |
setIndexType(Map<String,String> keysValues)
Given at map of
|
void |
setMetaIndex(MetaIndex metaIndex) |
void |
shutdown()
Shuts down the node and leaves the cluster
|
public CouchBaseNode(String clusterName, Integer replicas, Integer ramQuota, String scope)
public CouchBaseNode(String nodeIP, String nodePort, String username, String password, String clusterName, Integer replicas, Integer ramQuota, String scope)
public MetaIndex getMetaIndex()
public void setMetaIndex(MetaIndex metaIndex)
public Map<String,CouchBaseDataTypesHelper.DataType> getKeys()
public org.gcube.indexmanagement.resourceregistry.RRadaptor getRradaptor()
public String getDesignDocName()
public String getBucketName()
public String getScope()
public boolean checkIfBucketExists()
public void createCluster(boolean forceCreate)
throws Exception
forceCreate - Exceptionpublic void connectTo(String host, String port) throws IOException
host - port - IOExceptionpublic void joinCluster(String knownHostIP, String knownHostPort) throws Exception
knownHostIP - knownHostPort - Exceptionpublic void joinCluster(Map<String,String> knownHosts) throws Exception
Exceptionpublic void shutdown()
throws Exception
Exceptionpublic void destroy()
throws Exception
Exceptionpublic void loadKeysFromMetaIndex()
public void setIndexType(Map<String,String> keysValues)
keysValues - public void addIndexTypes(Map<String,String> keysValues)
keysValues - public String query(String queryString)
queryString - public boolean feedLocator(String locator) throws gr.uoa.di.madgik.grs.reader.GRS2ReaderException, URISyntaxException
locator - gr.uoa.di.madgik.grs.reader.GRS2ReaderExceptionURISyntaxExceptionpublic void deleteDocuments(List<String> docIDs)
docIDs - public Boolean deleteCollection(String collectionID)
collectionID - public void loadMetaFromDatabase()
public void commitMetaIndexToDatabase()
Copyright © 2013. All Rights Reserved.