Class VersionedPutAll
VersionedPutAll is an IEntryProcessor that assumes that entry values implement IVersionable interface and sets an Value proprty only for entries whose versions match to versions of the corresponding current values.
Inherited Members
Namespace: Tangosol.Util.Processor
Assembly: Coherence.dll
Syntax
public class VersionedPutAll : AbstractProcessor, IEntryProcessor, IPortableObject
Remarks
In case of the match, the VersionedPutAll will increment the version indicator before each value is updated.
Constructors
VersionedPutAll()
Default constructor.
Declaration
public VersionedPutAll()
VersionedPutAll(IDictionary)
Construct a VersionedPutAll processor that updates an entry with a new value if and only if the version of the new value matches to the version of the current entry's value (which must exist).
Declaration
public VersionedPutAll(IDictionary map)
Parameters
Type | Name | Description |
---|---|---|
IDictionary | map | A dictionary of values to update entries with. |
Remarks
The result of the Process(IInvocableCacheEntry) invocation does not return any result.
VersionedPutAll(IDictionary, bool, bool)
Construct a VersionedPutAll processor that updates an entry with a new value if and only if the version of the new value matches to the version of the current entry's value (which must exist).
Declaration
public VersionedPutAll(IDictionary map, bool allowInsert, bool ret)
Parameters
Type | Name | Description |
---|---|---|
IDictionary | map | A map of values to update entries with. |
bool | allowInsert | Specifies whether or not an insert should be allowed (no currently existing value). |
bool | ret | Specifies whether or not the processor should return the current value in case it has not been updated. |
Remarks
This processor optionally returns a map of entries that have not been updated (the versions did not match).
Fields
NO_RESULT
Used internally to differentiate between "no result" and null result.
Declaration
protected readonly object NO_RESULT
Field Value
Type | Description |
---|---|
object |
m_insert
Specifies whether or not an insert is allowed.
Declaration
protected bool m_insert
Field Value
Type | Description |
---|---|
bool |
m_map
Specifies the dictionary of new values.
Declaration
protected IDictionary m_map
Field Value
Type | Description |
---|---|
IDictionary |
m_return
Specifies whether or not a return value is required.
Declaration
protected bool m_return
Field Value
Type | Description |
---|---|
bool |
Methods
Equals(object)
Compare the VersionedPutAll 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 VersionedPutAll and the passed object are equivalent VersionedPutAll. |
Overrides
GetHashCode()
Determine a hash value for the VersionedPutAll object according to the general GetHashCode() contract.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | An integer hash value for this VersionedPutAll object. |
Overrides
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
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 | A dictionary containing the results of the processing, up to one entry for each IInvocableCacheEntry that was processed, keyed by the keys of the dictionary that were processed, with a corresponding value being the result of the processing for each key. |
Overrides
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 VersionedPutAll.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A String description of the VersionedPutAll. |
Overrides
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. |
processEntry(IInvocableCacheEntry, IDictionary, bool, bool)
Process the given entry.
Declaration
protected object processEntry(IInvocableCacheEntry entry, IDictionary mapAll, bool insert, bool ret)
Parameters
Type | Name | Description |
---|---|---|
IInvocableCacheEntry | entry | The IInvocableCacheEntry to process. |
IDictionary | mapAll | The map of new values. |
bool | insert | Specifies whether or not an insert is allowed. |
bool | ret | Specifies whether or not a return value is required. |
Returns
Type | Description |
---|---|
object | The result of the processing, if any. |