UpdaterProcessor is an EntryProcessor implementations that updates an attribute of an object cached in an InvocableMap.

While it's possible to update a value via standard Map API, using the updater allows for clustered caches using the UpdaterProcessor allows avoiding explicit concurrency control and could significantly reduce the amount of network traffic.

Type Parameters

  • K = any

  • V = any

  • T = any

Hierarchy

Constructors

Properties

Methods

Constructors

  • Construct an UpdaterProcessor based on the specified ValueUpdater.

    Type Parameters

    • K = any

      the type of the Map entry key

    • V = any

      the type of the Map entry value

    • T = any

      the return type of the ValueUpdater

    Parameters

    • updaterOrPropertyName: null | string | ValueUpdater

      a ValueUpdater object or the method name; passing null will simpy replace the entry's value with the specified one instead of updating it

    • value: T

      the value to update the target entry with

    Returns UpdaterProcessor<K, V, T>

Properties

@class: string
updater: null | ValueUpdater

The underlying ValueUpdater.

value: T

A value to update the entry's value with.

Methods

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