Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

InvocableMap Class Reference

#include <coherence/util/InvocableMap.hpp>

Inherits Map.

Inherited by NamedCache [virtual], and ConverterCollections::ConverterInvocableMap [virtual].

List of all members.


Detailed Description

Map with additional query features.

Author:
jh 2008.02.27

Public Types

typedef spec::Handle Handle
 InvocableMap Handle definition.
typedef spec::View View
 InvocableMap View definition.
typedef spec::Holder Holder
 InvocableMap Holder definition.

Public Member Functions

virtual Object::Holder invoke (Object::View vKey, EntryProcessor::Handle hAgent)=0
 Invoke the passed EntryProcessor against the Entry specified by the passed key, returning the result of the invocation.
virtual Map::View invokeAll (Collection::View vCollKeys, EntryProcessor::Handle hAgent)=0
 Invoke the passed EntryProcessor against the entries specified by the passed keys, returning the result of the invocation for each.
virtual Map::View invokeAll (Filter::View vFilter, EntryProcessor::Handle hAgent)=0
 Invoke the passed EntryProcessor against the set of entries that are selected by the given Filter, returning the result of the invocation for each.
virtual Object::Holder aggregate (Collection::View vCollKeys, EntryAggregator::Handle hAgent) const =0
 Perform an aggregating operation against the entries specified by the passed keys.
virtual Object::Holder aggregate (Filter::View vFilter, EntryAggregator::Handle hAgent) const =0
 Perform an aggregating operation against the set of entries that are selected by the given Filter.

Classes

class  Entry
 An InvocableMap::Entry contains additional information and exposes additional operations that the basic Map::Entry does not. More...
class  EntryAggregator
 An EntryAggregator represents processing that can be directed to occur against some subset of the entries in an InvocableMap, resulting in a aggregated result. More...
class  EntryProcessor
 An invocable agent that operates against the Entry objects within a Map. More...
class  ParallelAwareAggregator
 A ParallelAwareAggregator is an advanced extension to EntryAggregator that is explicitly capable of being run in parallel, for example in a distributed environment. More...

Member Function Documentation

virtual Object::Holder invoke ( Object::View  vKey,
EntryProcessor::Handle  hAgent 
) [pure virtual]

Invoke the passed EntryProcessor against the Entry specified by the passed key, returning the result of the invocation.

Parameters:
vKey the key to process; it is not required to exist within the Map
hAgent the EntryProcessor to use to process the specified key
Returns:
the result of the invocation as returned from the EntryProcessor

Implemented in ConverterCollections::ConverterInvocableMap, and ConverterCollections::ConverterNamedCache.

virtual Map::View invokeAll ( Collection::View  vCollKeys,
EntryProcessor::Handle  hAgent 
) [pure virtual]

Invoke the passed EntryProcessor against the entries specified by the passed keys, returning the result of the invocation for each.

Parameters:
vCollKeys the keys to process; these keys are not required to exist within the Map
hAgent the EntryProcessor to use to process the specified keys
Returns:
a Map containing the results of invoking the EntryProcessor against each of the specified keys

Implemented in ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterNamedCache, and ConverterCollections::ConverterNamedCache.

virtual Map::View invokeAll ( Filter::View  vFilter,
EntryProcessor::Handle  hAgent 
) [pure virtual]

Invoke the passed EntryProcessor against the set of entries that are selected by the given Filter, returning the result of the invocation for each.

Unless specified otherwise, InvocableMap implementations will perform this operation in two steps: (1) use the filter to retrieve a matching entry set; (2) apply the agent to every filtered entry. This algorithm assumes that the agent's processing does not affect the result of the specified filter evaluation, since the filtering and processing could be performed in parallel on different threads. If this assumption does not hold, the processor logic has to be idempotent, or at least re-evaluate the filter. This could be easily accomplished by wrapping the processor with a ConditionalProcessor.

Parameters:
vFilter a Filter that results in the set of keys to be processed
hAgent the EntryProcessor to use to process the specified keys
Returns:
a Map containing the results of invoking the EntryProcessor against the keys that are selected by the given Filter

Implemented in ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterNamedCache, and ConverterCollections::ConverterNamedCache.

virtual Object::Holder aggregate ( Collection::View  vCollKeys,
EntryAggregator::Handle  hAgent 
) const [pure virtual]

Perform an aggregating operation against the entries specified by the passed keys.

Parameters:
vCollKeys the Collection of keys that specify the entries within this Map to aggregate across
hAgent the EntryAggregator that is used to aggregate across the specified entries of this Map
Returns:
the result of the aggregation

Implemented in ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterNamedCache, and ConverterCollections::ConverterNamedCache.

virtual Object::Holder aggregate ( Filter::View  vFilter,
EntryAggregator::Handle  hAgent 
) const [pure virtual]

Perform an aggregating operation against the set of entries that are selected by the given Filter.

Parameters:
vFilter the Filter that is used to select entries within this Map to aggregate across
hAgent the EntryAggregator that is used to aggregate across the selected entries of this Map
Returns:
the result of the aggregation

Implemented in ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterInvocableMap, ConverterCollections::ConverterNamedCache, and ConverterCollections::ConverterNamedCache.


The documentation for this class was generated from the following file:
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.