Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VersionedPut<K, V>

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

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new VersionedPut(value: V, allowInsert?: boolean, returnCurrent?: boolean): VersionedPut
  • 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).

    Parameters

    • value: V

      a value to update an entry with

    • Default value allowInsert: boolean = false

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

    • Default value returnCurrent: boolean = false

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

    Returns VersionedPut

Properties

@class

@class: string

Protected Optional Readonly insert

insert: boolean

Specifies whether or not an insert is allowed.

Protected Optional return

return: boolean

Specifies whether or not a return value is required.

Protected Readonly value

value: V

Specifies the new value to update an entry with.

Methods

andThen

returnCurrent

  • returnCurrent(returnCurrent?: boolean): this
  • Parameters

    • Default value returnCurrent: boolean = true

    Returns this

when

  • 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>