public static interface StoreTimer.Aggregate extends StoreTimer.Event
LOG_KEY_SUFFIX_CACHE
Modifier and Type | Method and Description |
---|---|
StoreTimer.Counter |
compute(StoreTimer storeTimer)
Compute the value for this aggregate.
|
default StoreTimer.Counter |
compute(StoreTimer storeTimer,
StoreTimer.Event... events)
Compute the value for this aggregate.
|
default <T extends StoreTimer.Event> |
validate(BiConsumer<T,T> extraCheck,
T... events)
Helper for implementations to validate that all of the events in the aggregate conform to
some basic expectations.
|
default <T extends StoreTimer.Event> |
validate(T... events)
Helper for implementations to validate that all of the events in the aggregate conform to
some basic expectations.
|
logKey, logKeyWithSuffix, name, title
default <T extends StoreTimer.Event> T[] validate(@Nonnull T... events)
T
- the type of eventevents
- the events too validateRecordCoreArgumentException
- if the validation assumptions are violateddefault <T extends StoreTimer.Event> T[] validate(@Nonnull BiConsumer<T,T> extraCheck, @Nonnull T... events)
T
- the type of eventextraCheck
- a validation that takes the first event in the set of events and another event
in the set of events and ensures that they are sufficiently compatible to aggregateeevents
- the events too validateRecordCoreArgumentException
- if the validation assumptions are violated@Nullable StoreTimer.Counter compute(@Nonnull StoreTimer storeTimer)
storeTimer
- the time from which to draw the values that are necessary to compute this aggregate@Nullable default StoreTimer.Counter compute(@Nonnull StoreTimer storeTimer, @Nonnull StoreTimer.Event... events)
storeTimer
- the time from which to draw the values that are necessary to compute this aggregateevents
- the events that are to be aggregated into the resulting Counteer