IInvocableCacheInvokeAll Method (IFilter, IEntryProcessor) |
Namespace: Tangosol.Net.Cache
IDictionary InvokeAll( IFilter filter, IEntryProcessor agent )
Unless specified otherwise, IInvocableCache implementations will perform this operation in two steps: (1) use the filter to retrieve a matching entry collection; (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 the ConditionalProcessor.