public class AccountingPersistence extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
account(SingleUsageRecord usageRecord)
Persist the
#UsageRecord. |
void |
close() |
void |
flush(long timeout,
TimeUnit timeUnit) |
protected static AccountingPersistence |
getInstance() |
protected static AccountingPersistence getInstance()
public void account(SingleUsageRecord usageRecord) throws 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.usageRecord - the #UsageRecord to persistInvalidValueException - if the Record Validation FailsCopyright © 2015. All Rights Reserved.