public class PersistenceCouchBase
extends org.gcube.documentstore.persistence.PersistenceBackend
| Modifier and Type | Field and Description |
|---|---|
static Integer |
ALIVE_INTERVAL |
static String |
BUCKET_JOB_NAME_PROPERTY_KEY |
static String |
BUCKET_JOB_TYPE |
static String |
BUCKET_NAME_PROPERTY_KEY |
static String |
BUCKET_PORTLET_NAME_PROPERTY_KEY |
static String |
BUCKET_PORTLET_TYPE |
static String |
BUCKET_SERVICE_NAME_PROPERTY_KEY |
static String |
BUCKET_SERVICE_TYPE |
static String |
BUCKET_STORAGE_NAME_PROPERTY_KEY |
static String |
BUCKET_STORAGE_STATUS_NAME_PROPERTY_KEY |
static String |
BUCKET_STORAGE_STATUS_TYPE |
static String |
BUCKET_STORAGE_TYPE |
static String |
BUCKET_TASK_NAME_PROPERTY_KEY |
static String |
BUCKET_TASK_TYPE |
protected Map<String,String> |
bucketNames |
protected static com.couchbase.client.java.env.CouchbaseEnvironment |
ENV |
static String |
PASSWORD_PROPERTY_KEY |
static Integer |
TIMEOUT_BUCKET |
static String |
URL_PROPERTY_KEY |
| Constructor and Description |
|---|
PersistenceCouchBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeAndClean() |
protected void |
closeConnection() |
protected com.couchbase.client.java.document.JsonDocument |
createItem(com.couchbase.client.java.document.json.JsonObject jsonObject,
String id,
String recordType) |
protected com.couchbase.client.java.Bucket |
getBucketConnection(String recordType) |
static org.gcube.documentstore.records.Record |
jsonNodeToUsageRecord(com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode jsonNode) |
protected void |
openConnection() |
protected void |
prepareConnection(org.gcube.documentstore.persistence.PersistenceBackendConfiguration configuration) |
protected void |
reallyAccount(org.gcube.documentstore.records.Record record) |
static com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode |
usageRecordToJsonNode(org.gcube.documentstore.records.Record record) |
public static final String URL_PROPERTY_KEY
public static final String PASSWORD_PROPERTY_KEY
public static final String BUCKET_NAME_PROPERTY_KEY
public static final String BUCKET_STORAGE_NAME_PROPERTY_KEY
public static final String BUCKET_STORAGE_TYPE
public static final String BUCKET_STORAGE_STATUS_NAME_PROPERTY_KEY
public static final String BUCKET_STORAGE_STATUS_TYPE
public static final String BUCKET_SERVICE_NAME_PROPERTY_KEY
public static final String BUCKET_SERVICE_TYPE
public static final String BUCKET_PORTLET_NAME_PROPERTY_KEY
public static final String BUCKET_PORTLET_TYPE
public static final String BUCKET_JOB_NAME_PROPERTY_KEY
public static final String BUCKET_JOB_TYPE
public static final String BUCKET_TASK_NAME_PROPERTY_KEY
public static final String BUCKET_TASK_TYPE
public static final Integer TIMEOUT_BUCKET
public static final Integer ALIVE_INTERVAL
protected static final com.couchbase.client.java.env.CouchbaseEnvironment ENV
protected void prepareConnection(org.gcube.documentstore.persistence.PersistenceBackendConfiguration configuration)
throws Exception
prepareConnection in class org.gcube.documentstore.persistence.PersistenceBackendExceptionprotected void openConnection()
throws Exception
openConnection in class org.gcube.documentstore.persistence.PersistenceBackendExceptionprotected com.couchbase.client.java.Bucket getBucketConnection(String recordType)
protected com.couchbase.client.java.document.JsonDocument createItem(com.couchbase.client.java.document.json.JsonObject jsonObject,
String id,
String recordType)
throws Exception
Exceptionpublic static com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode usageRecordToJsonNode(org.gcube.documentstore.records.Record record)
throws Exception
Exceptionpublic static org.gcube.documentstore.records.Record jsonNodeToUsageRecord(com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode jsonNode)
throws Exception
Exceptionprotected void reallyAccount(org.gcube.documentstore.records.Record record)
throws Exception
reallyAccount in class org.gcube.documentstore.persistence.PersistenceBackendExceptionpublic void close()
throws Exception
close in class org.gcube.documentstore.persistence.PersistenceBackendExceptionprotected void closeAndClean()
throws Exception
closeAndClean in class org.gcube.documentstore.persistence.PersistenceBackendExceptionCopyright © 2017. All Rights Reserved.