public class AccountingAggregatorPlugin extends org.gcube.vremanagement.executor.plugin.Plugin<AccountingAggregatorPluginDeclaration>
| Modifier and Type | Field and Description |
|---|---|
com.couchbase.client.java.Bucket |
accountingBucket |
Aggregation |
aggregate |
static String |
AGGREGATED |
Boolean |
backup |
protected com.couchbase.client.java.Cluster |
cluster |
static Integer |
countDelete |
static Integer |
countInsert |
protected static com.couchbase.client.java.env.CouchbaseEnvironment |
ENV |
protected com.couchbase.client.java.PersistTo |
persisted |
static Integer |
recoveryMode |
static Integer |
typePersisted |
| Constructor and Description |
|---|
AccountingAggregatorPlugin(AccountingAggregatorPluginDeclaration pluginDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
elaborateBucket(String bucket,
String scope,
Integer inputStartTime,
Integer interval,
AggregationType aggType)
Elaborate a Bucket from startTime to interval
|
protected Boolean |
elaborateRow(com.couchbase.client.java.view.ViewRow row,
List<com.couchbase.client.java.document.JsonDocument> documentElaborate)
Elaborate row for aggregate
elaborateRow
|
protected static Map<String,? extends Serializable> |
getMapFromString(String serializedMap)
getMapFromString
|
void |
initFolder()
Init folder for backup file
|
void |
launch(Map<String,Object> inputs) |
protected void |
onStop() |
protected boolean |
reallyFlush(Aggregation aggregate,
List<com.couchbase.client.java.document.JsonDocument> docs,
String nameFile)
Delete a record not aggregate and insert a new record aggregate
If a problem with delete record, not insert a new record and save a backupfile
reallyFlush
|
public com.couchbase.client.java.Bucket accountingBucket
protected com.couchbase.client.java.Cluster cluster
public Aggregation aggregate
public static final String AGGREGATED
public static Integer countInsert
public static Integer countDelete
public static Integer recoveryMode
public Boolean backup
public static Integer typePersisted
protected com.couchbase.client.java.PersistTo persisted
protected static final com.couchbase.client.java.env.CouchbaseEnvironment ENV
public AccountingAggregatorPlugin(AccountingAggregatorPluginDeclaration pluginDeclaration)
runningPluginEvolution - public void launch(Map<String,Object> inputs) throws Exception
launch in class org.gcube.vremanagement.executor.plugin.Plugin<AccountingAggregatorPluginDeclaration>Exceptionprotected void onStop()
throws Exception
onStop in class org.gcube.vremanagement.executor.plugin.Plugin<AccountingAggregatorPluginDeclaration>Exceptionpublic void initFolder()
protected boolean elaborateBucket(String bucket, String scope, Integer inputStartTime, Integer interval, AggregationType aggType) throws Exception
bucket - inputStartTime - interval - aggType - Exceptionprotected Boolean elaborateRow(com.couchbase.client.java.view.ViewRow row, List<com.couchbase.client.java.document.JsonDocument> documentElaborate) throws Exception
row - Exceptionprotected static Map<String,? extends Serializable> getMapFromString(String serializedMap)
serializedMap - protected boolean reallyFlush(Aggregation aggregate, List<com.couchbase.client.java.document.JsonDocument> docs, String nameFile) throws Exception
aggregate - docs - nameFile - ExceptionCopyright © 2017. All Rights Reserved.