VersionedPut is an EntryProcessor that assumes that entry values are versioned (see Coherence Versionable interface for details) and performs an update/insert operation if and only if the version of the specified value matches the version of the corresponding value. VersionedPutAll will increment the version indicator before each value is updated.

Type Parameters

  • K = any

  • V = any

Hierarchy

Constructors

Properties

Methods

Constructors

  • Construct a VersionedPut 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. This processor optionally returns the current value as a result of the invocation if it has not been updated (the versions did not match).

    Type Parameters

    • K = any

    • V = any

    Parameters

    • value: V

      a value to update an entry with

    • allowInsert: boolean = false

      specifies whether or not an insert should be allowed (no currently existing value)

    • returnCurrent: boolean = false

      specifies whether or not the processor should return the current value in case it has not been updated

    Returns VersionedPut<K, V>

Properties

@class: string
insert?: boolean

Specifies whether or not an insert is allowed.

return?: boolean

Specifies whether or not a return value is required.

value: V

Specifies the new value to update an entry with.

Methods

  • Parameters

    • returnCurrent: boolean = true

    Returns VersionedPut<K, V>

  • Returns a ConditionalProcessor comprised of this processor and the provided filter.

    The specified entry processor gets invoked if and only if the filter applied to the entry evaluates to true; otherwise the result of the invocation will return null.

    Parameters

    Returns EntryProcessor<K, V, V>