public class CachingGroupData extends GroupData
GroupDataSummary
updates the summary for each record update. It
stores a partialCopy of the BulletRecord
so that the existing GroupData
in the summary can just
GroupData.consume(BulletRecord)
it. It also can only be initialized with already created group fields, field
aliases, and metrics. This helps us not have to keep recreating group fields, fields aliases, and metrics for every
single record.fieldAliases, groupFields, metrics
Constructor and Description |
---|
CachingGroupData(Map<String,String> groupFields,
Map<String,String> fieldAliases,
Map<GroupOperation,Number> metrics)
Constructor that initializes the CachingGroupData with an existing
Map of GroupOperation to values and
a Map of Strings that represent the group fields. |
Modifier and Type | Method and Description |
---|---|
static CachingGroupData |
copy(GroupData other)
Creates a full copy of another
GroupData . |
CachingGroupData |
partialCopy()
Creates a partial copy of itself.
|
combine, combine, consume, getAsBulletRecord, getAsBulletRecord, getMetricsAsBulletRecord, getResultName, makeInitialMetrics
public CachingGroupData(Map<String,String> groupFields, Map<String,String> fieldAliases, Map<GroupOperation,Number> metrics)
Map
of GroupOperation
to values and
a Map
of Strings that represent the group fields. These arguments are not copied.groupFields
- The mappings of field names to their values that represent this group.fieldAliases
- The mappings of field names to their new names.metrics
- the non-null Map
of metrics for this object.public CachingGroupData partialCopy()
CachingGroupData
.public static CachingGroupData copy(GroupData other)
GroupData
.other
- The other GroupData to copy. If not-null, must have groups and metrics.CachingGroupData
copy of the GroupData or null if it was null.Copyright © 2021. All rights reserved.