Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TrajectoryService<T>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

dataType

dataType: new () => DataObjectPosition

Type declaration

    • new (): DataObjectPosition
    • Returns DataObjectPosition

Protected driver

driver: DataServiceDriver<PositionIdentifier, DataObjectPosition>

logger

logger: (level: string, log: any) => void = ...

Type declaration

    • (level: string, log: any): void
    • Parameters

      • level: string
      • log: any

      Returns void

name

name: string

Service name

Readonly Static captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Readonly Static errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

appendPosition

  • appendPosition(object: DataObject): Promise<DataObjectPosition>

count

  • count(query?: FilterQuery<DataObjectPosition>): Promise<number>

createIndex

  • createIndex(index: string): Promise<void>

delete

deleteAll

  • deleteAll(): Promise<void>

emit

  • emit(name: string | symbol, ...args: any[]): boolean
  • emit(name: "ready"): boolean
  • emit(name: "destroy"): boolean

emitAsync

  • emitAsync(type: string | symbol, ...args: any[]): Promise<boolean>

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

findAll

findByUID

findOne

findPosition

findTrajectory

  • findTrajectory(uid: string, start?: number | Date, end?: number | Date): Promise<AbsolutePosition[]>
  • Find the trajectory of an object from start to end date

    Parameters

    • uid: string

      Unique identifier of data object

    • Optional start: number | Date

      Start time or date

    • Optional end: number | Date

      End time or date

    Returns Promise<AbsolutePosition[]>

    Array of positions sorted by time

getMaxListeners

  • getMaxListeners(): number

insert

isReady

  • isReady(): boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

on

  • on(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

once

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): TrajectoryService<T>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TrajectoryService<T>

setMaxListeners

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>