public class AccountingPersistence extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AccountingPersistence(String scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
account(org.gcube.documentstore.records.Record record)
Persist the
#UsageRecord. |
void |
close() |
void |
flush(long timeout,
TimeUnit timeUnit) |
protected String scope
protected AccountingPersistence(String scope)
public void account(org.gcube.documentstore.records.Record record)
throws org.gcube.documentstore.exception.InvalidValueException
#UsageRecord.
The Record is validated first, then accounted, in a separated thread.
So that the program can continue the execution.
If the persistence fails the class write that the record in a local file
so that the #UsageRecord can be recorder later.record - the #UsageRecord to persistorg.gcube.documentstore.exception.InvalidValueExceptionCopyright © 2017. All Rights Reserved.