public abstract class AggregationScheduler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static AggregationScheduler |
aggregationScheduler |
protected Map<String,List<AggregationStrategy>> |
records |
protected int |
totalBufferedRecords |
protected List<UsageRecord> |
unaggregableRecords |
| Modifier | Constructor and Description |
|---|---|
protected |
AggregationScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(SingleUsageRecord usageRecord,
AccountingPersistenceExecutor persistenceExecutor)
Get an usage records and try to aggregate with other buffered
Usage Record.
|
protected void |
aggregate(SingleUsageRecord usageRecord,
AccountingPersistenceExecutor persistenceExecutor,
boolean forceFlush) |
protected void |
clear() |
void |
flush(AccountingPersistenceExecutor persistenceExecutor) |
protected Class<? extends AggregatedUsageRecord> |
getAggregatedUsageRecordClass(String usageRecordName) |
protected Class<? extends AggregationStrategy> |
getAggregattionStrategyUsageRecordClass(String usageRecordName) |
static AggregationScheduler |
getInstance() |
protected AggregatedUsageRecord |
instantiateAggregatedUsageRecord(UsageRecord usageRecord) |
protected AggregationStrategy |
instantiateAggregationStrategy(AggregatedUsageRecord aggregatedUsageRecord) |
protected abstract boolean |
isTimeToPersist() |
protected void |
madeAggregation(UsageRecord usageRecord) |
protected abstract void |
specificClear() |
protected static AggregationScheduler aggregationScheduler
protected int totalBufferedRecords
protected Map<String,List<AggregationStrategy>> records
protected List<UsageRecord> unaggregableRecords
public static AggregationScheduler getInstance()
protected Class<? extends AggregatedUsageRecord> getAggregatedUsageRecordClass(String usageRecordName) throws ClassNotFoundException
ClassNotFoundExceptionprotected AggregatedUsageRecord instantiateAggregatedUsageRecord(UsageRecord usageRecord) throws Exception
Exceptionprotected Class<? extends AggregationStrategy> getAggregattionStrategyUsageRecordClass(String usageRecordName) throws ClassNotFoundException
ClassNotFoundExceptionprotected AggregationStrategy instantiateAggregationStrategy(AggregatedUsageRecord aggregatedUsageRecord) throws Exception
Exceptionprotected void madeAggregation(UsageRecord usageRecord)
public void flush(AccountingPersistenceExecutor persistenceExecutor) throws Exception
Exceptionprotected abstract void specificClear()
protected void clear()
protected void aggregate(SingleUsageRecord usageRecord, AccountingPersistenceExecutor persistenceExecutor, boolean forceFlush) throws Exception
Exceptionpublic void aggregate(SingleUsageRecord usageRecord, AccountingPersistenceExecutor persistenceExecutor) throws Exception
usageRecord - the Usage Record To BufferException - if failsprotected abstract boolean isTimeToPersist()
Copyright © 2015. All Rights Reserved.