Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UpdaterProcessor<K, V, T>

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

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construct an UpdaterProcessor based on the specified ValueUpdater.

    typeparam

    the type of the Map entry key

    typeparam

    the type of the Map entry value

    typeparam

    the return type of the ValueUpdater

    Parameters

    • updaterOrPropertyName: string | ValueUpdater | null

      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

Properties

@class

@class: string

Protected Readonly updater

updater: ValueUpdater | null

The underlying ValueUpdater.

Protected Readonly value

value: T

A value to update the entry's value with.

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