Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VersionedPutAll<K, V>

VersionedPutAll is an EntryProcessor that assumes that entry values are versioned (see Coherence Versionable interface for details) and performs an update/insert operation only for entries whose versions match to versions of the corresponding current values. In case of the match, the VersionedPutAll will increment the version indicator before each value is updated.

Type parameters

  • K = any

    the type of the Map entry key

  • V = any

    the type of the Map entry value

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new VersionedPutAll(map: Map<K, V>, allowInsert?: boolean, returnCurrent?: boolean): VersionedPutAll
  • 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). This processor optionally returns a map of entries that have not been updated (the versions did not match).

    Parameters

    • map: Map<K, V>

      a map of values to update entries 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 entries that have not been updated

    Returns VersionedPutAll

Properties

@class

@class: string

Protected Readonly entries

entries: MapHolder<K, V>

Specifies the new value to update an entry with.

Protected Optional Readonly insert

insert: boolean

Specifies whether or not an insert is allowed.

Protected Optional Readonly return

return: boolean

Specifies whether or not a return value is required.

Methods

andThen

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, void>