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,
PersistenceExecutor persistenceExecutor)
Get an usage records and try to aggregate with other buffered
Usage Record.
|
protected void |
aggregate(SingleUsageRecord usageRecord,
PersistenceExecutor persistenceExecutor,
boolean forceFlush) |
void |
flush(PersistenceExecutor 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 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(PersistenceExecutor persistenceExecutor) throws Exception
Exceptionprotected void aggregate(SingleUsageRecord usageRecord, PersistenceExecutor persistenceExecutor, boolean forceFlush) throws Exception
Exceptionpublic void aggregate(SingleUsageRecord usageRecord, PersistenceExecutor persistenceExecutor) throws Exception
usageRecord - the Usage Record To BufferException - if failsprotected abstract boolean isTimeToPersist()
Copyright © 2015. All Rights Reserved.