Interface ContinuousAggregator<K,V,R>
- Type Parameters:
K- the type of the map entry keysV- the type of the map entry valuesR- the type of the final aggregation result
InvocableMap.
A handle is bound to the map that created it. Calling aggregate()
performs a network operation that obtains the current partial results from
storage members and combines them into the final result. The final result is
not maintained or cached by the handle.
- Since:
- 26.10
- Author:
- Aleks Seovic 2026.09.06
-
Method Summary
Modifier and TypeMethodDescriptionObtain the current aggregation result.<T> Tinvoke(K key, Remote.Function<? super R, ? extends T> function) Invoke a function against the continuously maintained result for the partition containing the specified key.invokeAll(Collection<? extends K> keys, Remote.BiFunction<? super K, ? super R, ? extends T> function) Invoke a function against the continuously maintained partition result for each specified key.
-
Method Details
-
aggregate
R aggregate()Obtain the current aggregation result.This method performs a network operation that collects continuously maintained partial results from storage members and combines them into the final result.
- Returns:
- the current aggregation result
- Throws:
IllegalStateException- if this handle's registration has been removed
-
invoke
Invoke a function against the continuously maintained result for the partition containing the specified key.This method performs an entry-processor network operation. The function executes on the storage member after Coherence obtains and finalizes a detached, exact result for that partition. The map entry itself is not read or modified and does not need to be present.
- Type Parameters:
T- the function result type- Parameters:
key- a key identifying the partition to queryfunction- the function to apply to the partition result- Returns:
- the function result
- Throws:
IllegalArgumentException- if the key is associated with more than one partitionIllegalStateException- if this handle's registration has been removed
-
invokeAll
<T> Map<K,T> invokeAll(Collection<? extends K> keys, Remote.BiFunction<? super K, ? super R, ? extends T> function) Invoke a function against the continuously maintained partition result for each specified key.Each partition result is obtained and finalized at most once per storage invocation, then reused for every key from that partition. Map entries are not read or modified and do not need to be present.
- Type Parameters:
T- the function result type- Parameters:
keys- keys identifying the partitions to queryfunction- the function to apply to each key and its partition result- Returns:
- the function results, keyed by each supplied key
- Throws:
IllegalArgumentException- if any key is associated with more than one partitionIllegalStateException- if this handle's registration has been removed
-