Show / Hide Table of Contents

Class ConditionalPutAll

ConditionalPutAll is an IEntryProcessor that sets Value for multiple entries that satisfy the specified condition.

Inheritance
object
AbstractProcessor
ConditionalPutAll
Implements
IEntryProcessor
IPortableObject
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Processor
Assembly: Coherence.dll
Syntax
public class ConditionalPutAll : AbstractProcessor, IEntryProcessor, IPortableObject
Remarks

Obviously, using more specific, fine-tuned filters may provide additional flexibility and efficiency allowing the multi-put operations to be performed conditionally on values of specific attributes (or even calculations) instead of a simple existence check.

Constructors

ConditionalPutAll()

Default constructor.

Declaration
public ConditionalPutAll()

ConditionalPutAll(IFilter, IDictionary)

Construct a ConditionalPutAll processor that updates an entry with a new value if and only if the filter applied to the entry evaluates to true.

Declaration
public ConditionalPutAll(IFilter filter, IDictionary dictionary)
Parameters
Type Name Description
IFilter filter

The filter to evaluate all supplied entries.

IDictionary dictionary

A dictionary of values to update entries with.

Remarks

The new value is extracted from the specified map based on the entry's key.

Fields

m_dictionary

Specifies the map of new values.

Declaration
protected IDictionary m_dictionary
Field Value
Type Description
IDictionary

m_filter

The underlying filter.

Declaration
protected IFilter m_filter
Field Value
Type Description
IFilter

Methods

Equals(object)

Compare the ConditionalPutAll with another object to determine equality.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
object o

The object to compare with.

Returns
Type Description
bool

true iff this ConditionalPutAll and the passed object are equivalent ConditionalPutAll.

Overrides
object.Equals(object)

GetHashCode()

Determine a hash value for the ConditionalPut object according to the general GetHashCode() contract.

Declaration
public override int GetHashCode()
Returns
Type Description
int

An integer hash value for this ConditionalPutAll object.

Overrides
object.GetHashCode()

Process(IInvocableCacheEntry)

Process an IInvocableCacheEntry.

Declaration
public override object Process(IInvocableCacheEntry entry)
Parameters
Type Name Description
IInvocableCacheEntry entry

The IInvocableCacheEntry to process.

Returns
Type Description
object

The result of the processing, if any.

Overrides
AbstractProcessor.Process(IInvocableCacheEntry)

ProcessAll(ICollection)

Process a collection of IInvocableCacheEntry objects.

Declaration
public override IDictionary ProcessAll(ICollection entries)
Parameters
Type Name Description
ICollection entries

A read-only collection of IInvocableCacheEntry objects to process.

Returns
Type Description
IDictionary

An empty, immutable dictionary.

Overrides
AbstractProcessor.ProcessAll(ICollection)

ReadExternal(IPofReader)

Restore the contents of a user type instance by reading its state using the specified IPofReader object.

Declaration
public virtual void ReadExternal(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

The IPofReader from which to read the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

ToString()

Return a human-readable description for this ConditionalPutAll.

Declaration
public override string ToString()
Returns
Type Description
string

A String description of the ConditionalPutAll.

Overrides
object.ToString()

WriteExternal(IPofWriter)

Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.

Declaration
public virtual void WriteExternal(IPofWriter writer)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter to which to write the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IEntryProcessor
IPortableObject
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.