public static class PartitionedJCacheStatistics.PartitionedCacheStatisticsAggregator extends Object implements InvocableMap.StreamingAggregator, ExternalizableLite, PortableObject
ALLOW_INCONSISTENCIES, BY_MEMBER, BY_PARTITION, PARALLEL, PRESENT_ONLY, RETAINS_ENTRIES, SERIAL
Constructor and Description |
---|
PartitionedCacheStatisticsAggregator()
|
PartitionedCacheStatisticsAggregator(JCacheIdentifier id,
ValueExtractor valueExtractor)
Constructs an aggregator to aggregate JCache Cache Statistics from
all storage-enabled servers for a JCache implemented as a Partitioned Cache.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accumulate(InvocableMap.Entry entry)
Accumulate one entry into the result.
|
int |
characteristics()
A bit mask representing the set of characteristics of this aggregator.
|
boolean |
combine(Object partialResult)
Merge another partial result into the result.
|
Object |
finalizeResult()
Return the final result of the aggregation.
|
Object |
getPartialResult()
Return the partial result of the aggregation.
|
protected void |
process(Object o) |
void |
readExternal(DataInput in)
Restore the contents of this object by loading the object's state from
the passed DataInput object.
|
void |
readExternal(PofReader in)
Restore the contents of a user type instance by reading its state using
the specified PofReader object.
|
InvocableMap.StreamingAggregator |
supply()
Create a new instance of this aggregator.
|
void |
writeExternal(DataOutput out)
Save the contents of this object by storing the object's state into
the passed DataOutput object.
|
void |
writeExternal(PofWriter out)
Save the contents of a POF user type instance by writing its state using
the specified PofWriter object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accumulate, aggregate, isAllowInconsistencies, isByMember, isByPartition, isParallel, isPresentOnly, isRetainsEntries, isSerial
public PartitionedCacheStatisticsAggregator()
public PartitionedCacheStatisticsAggregator(JCacheIdentifier id, ValueExtractor valueExtractor)
id
- the JCache cache to collect cache statistics for.valueExtractor
- extract CacheStatistics via binary entry context.public InvocableMap.StreamingAggregator supply()
InvocableMap.StreamingAggregator
supply
in interface InvocableMap.StreamingAggregator
public boolean accumulate(InvocableMap.Entry entry)
InvocableMap.StreamingAggregator
accumulate
in interface InvocableMap.StreamingAggregator
entry
- the entry to accumulate into the aggregation resulttrue
to continue the aggregation, and false
to
signal to the caller that the result is ready and the
aggregation can be short-circuitedpublic boolean combine(Object partialResult)
InvocableMap.StreamingAggregator
combine
in interface InvocableMap.StreamingAggregator
partialResult
- the partial result to mergetrue
to continue the aggregation, and false
to
signal to the caller that the result is ready and the
aggregation can be short-circuitedpublic Object getPartialResult()
InvocableMap.StreamingAggregator
getPartialResult
in interface InvocableMap.StreamingAggregator
public Object finalizeResult()
InvocableMap.StreamingAggregator
finalizeResult
in interface InvocableMap.StreamingAggregator
public int characteristics()
InvocableMap.StreamingAggregator
Be default, characteristics are a combination of InvocableMap.StreamingAggregator.PARALLEL
and InvocableMap.StreamingAggregator.RETAINS_ENTRIES
, which is sub-optimal and should be
overridden by the aggregator implementation if the aggregator does not
need to retain entries (which is often the case).
characteristics
in interface InvocableMap.StreamingAggregator
InvocableMap.StreamingAggregator.PARALLEL
,
InvocableMap.StreamingAggregator.SERIAL
,
InvocableMap.StreamingAggregator.BY_MEMBER
,
InvocableMap.StreamingAggregator.BY_PARTITION
,
InvocableMap.StreamingAggregator.RETAINS_ENTRIES
,
InvocableMap.StreamingAggregator.PRESENT_ONLY
protected void process(Object o)
public void readExternal(DataInput in) throws IOException
ExternalizableLite
readExternal
in interface ExternalizableLite
in
- the DataInput stream to read data from in order to restore
the state of this objectIOException
- if an I/O exception occursNotActiveException
- if the object is not in its initial
state, and therefore cannot be deserialized intopublic void writeExternal(DataOutput out) throws IOException
ExternalizableLite
writeExternal
in interface ExternalizableLite
out
- the DataOutput stream to write the state of this object toIOException
- if an I/O exception occurspublic void readExternal(PofReader in) throws IOException
PortableObject
readExternal
in interface PortableObject
in
- the PofReader from which to read the object's stateIOException
- if an I/O error occurspublic void writeExternal(PofWriter out) throws IOException
PortableObject
writeExternal
in interface PortableObject
out
- the PofWriter to which to write the object's stateIOException
- if an I/O error occurs