Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapEvent<K, V>

Type parameters

  • K = any

  • V = any

Hierarchy

  • MapEvent

Index

Constructors

constructor

  • Constructs a new MapEvent

    Parameters

    • source: NamedCache<K, V>

      the event source

    • mapEventResponse: MapEventResponse

      the {@link MapEventResponse} from the server

    • serializer: Serializer

    Returns MapEvent

Properties

Protected _id

_id: number

Event id; may be one of ENTRY_INSERTED, ENTRY_UPDATED, or ENTRY_DELETED.

Protected Optional _key

_key: K

The deserialized key.

Protected _name

_name: string

The name of cache from which the event originated.

Protected Optional _newValue

_newValue: V

The deserialized new value.

Protected Optional _oldValue

_oldValue: V

The deserialized old value.

Protected _source

_source: () => NamedCache<K, V>

The event source.

Type declaration

Protected keyBytes

keyBytes: Uint8Array

Serialized representation of the cache key associated with this event.

Protected Optional newValueBytes

newValueBytes: Uint8Array

Serialized representation of the new cache value associated with this event.

Protected Optional oldValueBytes

oldValueBytes: Uint8Array

Serialized representation of the old cache value associated with this event.

Protected serializer

serializer: Serializer

The Serializer to use to deserialize in-bound MapEvents.

Static Readonly ENTRY_DELETED

ENTRY_DELETED: 3 = 3

This event indicates that an entry has been removed from the map.

Static Readonly ENTRY_INSERTED

ENTRY_INSERTED: 1 = 1

This event indicates that an entry has been added to the map.

Static Readonly ENTRY_UPDATED

ENTRY_UPDATED: 2 = 2

This event indicates that an entry has been updated in the map.

Accessors

description

  • get description(): string
  • Return a string description for the event. This may be one of:

    • inserted
    • updated
    • deleted

    Returns string

    a string description for the event

id

  • get id(): number

key

  • get key(): K
  • Return the key for the entry generating the event.

    Returns K

    the key for the entry generating the event

name

  • get name(): string
  • Return the cache name from which the event originated.

    Returns string

    the cache name from which the event originated

newValue

  • get newValue(): V | undefined
  • Return the new value for the entry generating the event.

    Returns V | undefined

    the new value, if any, for the entry generating the event

oldValue

  • get oldValue(): V | undefined
  • Return the old value for the entry generating the event.

    Returns V | undefined

    the old value, if any, for the entry generating the event

source

  • Return the event source.

    Returns NamedCache<K, V>

    the event source