Class PartitionedJCacheStatistics.PartitionedCacheStatisticsAggregator
java.lang.Object
com.tangosol.coherence.jcache.partitionedcache.PartitionedJCacheStatistics.PartitionedCacheStatisticsAggregator
- All Implemented Interfaces:
ExternalizableLite
,PortableObject
,InvocableMap.EntryAggregator
,InvocableMap.StreamingAggregator
,Serializable
- Enclosing class:
PartitionedJCacheStatistics
public static class PartitionedJCacheStatistics.PartitionedCacheStatisticsAggregator
extends Object
implements InvocableMap.StreamingAggregator, ExternalizableLite, PortableObject
Collect JCache CacheStatistics from all storage-enabled members.
- See Also:
-
Field Summary
Fields inherited from interface com.tangosol.util.InvocableMap.StreamingAggregator
ALLOW_INCONSISTENCIES, BY_MEMBER, BY_PARTITION, PARALLEL, PRESENT_ONLY, RETAINS_ENTRIES, SERIAL
-
Constructor Summary
ConstructorDescriptionPartitionedCacheStatisticsAggregator
(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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
accumulate
(InvocableMap.Entry entry) Accumulate one entry into the result.int
A bit mask representing the set of characteristics of this aggregator.boolean
Merge another partial result into the result.Return the final result of the aggregation.Return the partial result of the aggregation.protected void
void
Restore the contents of a user type instance by reading its state using the specified PofReader object.void
Restore the contents of this object by loading the object's state from the passed DataInput object.supply()
Create a new instance of this aggregator.void
writeExternal
(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.void
writeExternal
(DataOutput out) Save the contents of this object by storing the object's state into the passed DataOutput object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tangosol.util.InvocableMap.StreamingAggregator
accumulate, aggregate, isAllowInconsistencies, isByMember, isByPartition, isParallel, isPresentOnly, isRetainsEntries, isSerial
-
Constructor Details
-
PartitionedCacheStatisticsAggregator
public PartitionedCacheStatisticsAggregator() -
PartitionedCacheStatisticsAggregator
Constructs an aggregator to aggregate JCache Cache Statistics from all storage-enabled servers for a JCache implemented as a Partitioned Cache.- Parameters:
id
- the JCache cache to collect cache statistics for.valueExtractor
- extract CacheStatistics via binary entry context.
-
-
Method Details
-
supply
Description copied from interface:InvocableMap.StreamingAggregator
Create a new instance of this aggregator.- Specified by:
supply
in interfaceInvocableMap.StreamingAggregator
- Returns:
- a StreamAggregator
-
accumulate
Description copied from interface:InvocableMap.StreamingAggregator
Accumulate one entry into the result.- Specified by:
accumulate
in interfaceInvocableMap.StreamingAggregator
- Parameters:
entry
- the entry to accumulate into the aggregation result- Returns:
true
to continue the aggregation, andfalse
to signal to the caller that the result is ready and the aggregation can be short-circuited
-
combine
Description copied from interface:InvocableMap.StreamingAggregator
Merge another partial result into the result.- Specified by:
combine
in interfaceInvocableMap.StreamingAggregator
- Parameters:
partialResult
- the partial result to merge- Returns:
true
to continue the aggregation, andfalse
to signal to the caller that the result is ready and the aggregation can be short-circuited
-
getPartialResult
Description copied from interface:InvocableMap.StreamingAggregator
Return the partial result of the aggregation.- Specified by:
getPartialResult
in interfaceInvocableMap.StreamingAggregator
- Returns:
- the partial result of the aggregation
-
finalizeResult
Description copied from interface:InvocableMap.StreamingAggregator
Return the final result of the aggregation.- Specified by:
finalizeResult
in interfaceInvocableMap.StreamingAggregator
- Returns:
- the final result of the aggregation
-
characteristics
public int characteristics()Description copied from interface:InvocableMap.StreamingAggregator
A bit mask representing the set of characteristics of this aggregator.By default, characteristics are a combination of
InvocableMap.StreamingAggregator.PARALLEL
andInvocableMap.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).- Specified by:
characteristics
in interfaceInvocableMap.StreamingAggregator
- Returns:
- a bit mask representing the set of characteristics of this aggregator
- See Also:
-
process
-
readExternal
Description copied from interface:ExternalizableLite
Restore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternal
in interfaceExternalizableLite
- Parameters:
in
- the DataInput stream to read data from in order to restore the state of this object- Throws:
IOException
- if an I/O exception occurs
-
writeExternal
Description copied from interface:ExternalizableLite
Save the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternal
in interfaceExternalizableLite
- Parameters:
out
- the DataOutput stream to write the state of this object to- Throws:
IOException
- if an I/O exception occurs
-
readExternal
Description copied from interface:PortableObject
Restore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternal
in interfacePortableObject
- Parameters:
in
- the PofReader from which to read the object's state- Throws:
IOException
- if an I/O error occurs
-
writeExternal
Description copied from interface:PortableObject
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternal
in interfacePortableObject
- Parameters:
out
- the PofWriter to which to write the object's state- Throws:
IOException
- if an I/O error occurs
-