Type Parameters

  • K = any

  • V = any

Hierarchy

  • MapEvent

Constructors

  • Constructs a new MapEvent

    Type Parameters

    • K = any

    • V = any

    Parameters

    • source: NamedCache<K, V>

      the event source

    • mapEventResponse: MapEventResponse

      the gRPC MapEventResponse from the server

    • serializer: Serializer

      the Serializer to use to deserialize in-bound MapEvents.

    Returns MapEvent<K, V>

Properties

_id: number

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

_key?: K

The deserialized key.

_name: string

The name of cache from which the event originated.

_newValue?: V

The deserialized new value.

_oldValue?: V

The deserialized old value.

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

Type declaration

keyBytes: Uint8Array

Serialized representation of the cache key associated with this event.

newValueBytes?: Uint8Array

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

oldValueBytes?: Uint8Array

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

serializer: Serializer

The Serializer to use to deserialize in-bound MapEvents.

ENTRY_DELETED: 3 = 3

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

ENTRY_INSERTED: 1 = 1

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

ENTRY_UPDATED: 2 = 2

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

Accessors

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

    • inserted
    • updated
    • deleted

    Returns

    a string description for the event

    Returns string

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

    Returns

    the key for the entry generating the event

    Returns K

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

    Returns

    the cache name from which the event originated

    Returns string

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

    Returns

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

    Returns undefined | V

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

    Returns

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

    Returns undefined | V

  • get source(): NamedCache<K, V>
  • Return the event source.

    Returns

    the event source

    Returns NamedCache<K, V>