Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventMetadataImpl

Metadata for a time series event

Hierarchy

  • EventMetadataImpl

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new EventMetadataImpl(sequence: number, timestamp: number, author: string): EventMetadataImpl
  • Create a new EventMetadataImpl instance

    Parameters

    • sequence: number

      the event sequence number

    • timestamp: number

      the event timestamp

    • author: string

      the event author

    Returns EventMetadataImpl

Properties

Readonly author

author: string

Server-authenticated identity of the session that created the event.

If the session that created the event was not authenticated, the author will be an empty string.

Readonly sequence

sequence: number

Sequence number identifying this event within its time series. Assigned by the server when the event is created.

Sequence numbers are unique within a time series. Each event appended to a time series is assigned a sequence number that is is equal to the sequence number of the preceding event plus one.

The JavaScript client uses the number primitive type to encode sequence numbers. This allows 53 bit integers to be represented without loss. Note that this is less than the 64 bit integers used by the server and encoded in the protocol.

Readonly timestamp

timestamp: number

Event timestamp. Assigned by the server when the event is created.

Events do not have unique timestamps. Events with different sequence numbers may have the same timestamp.

Subsequent events in a time series usually have timestamps that are greater or equal to the timestamps of earlier events, but this is not guaranteed due to changes to the time source used by the server.

Timestamps represent the difference, measured in milliseconds, between the time the server added the event to the time series and midnight, January 1, 1970 UTC

Methods

equals

  • equals(other: any): boolean
  • Check if the EventMetadataImpl is equal to another object

    Parameters

    • other: any

      the other object

    Returns boolean

    true if the other object is a EventMetadataImpl and is equal

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.