Class NotificationsManager

Hierarchy

  • CreateDestroyStartStop
    • NotificationsManager

Constructors

Properties

[initLock]: RWLockWriter
acl: ACL
db: DB
keyRing: KeyRing
logger: Logger
messageCap: number
nodeConnectionManager: NodeConnectionManager
nodeManager: NodeManager
notificationIdGenerator: (() => NotificationId)

Type declaration

notificationsDbPath: readonly (string | Buffer)[] = ...

Top level stores MESSAGE_COUNT_KEY -> number (of messages)

notificationsMessageCounterDbPath: readonly (string | Buffer)[] = ...
notificationsMessagesDbPath: readonly (string | Buffer)[] = ...

Messages stores NotificationId -> string (message)

Accessors

  • get [destroyed](): boolean
  • Returns boolean

  • get [eventHandled](): ReadonlyWeakSet<Event>
  • Returns ReadonlyWeakSet<Event>

  • get [eventHandlers](): ReadonlyMap<string, Set<EventHandlerInfo>>
  • Returns ReadonlyMap<string, Set<EventHandlerInfo>>

  • get [eventTarget](): EventTarget
  • Returns EventTarget

  • get [handleEventError](): ((evt) => void)
  • Returns ((evt) => void)

      • (evt): void
      • Parameters

        • evt: EventError

        Returns void

  • get [running](): boolean
  • Returns boolean

  • get [statusP](): Promise<Status>
  • Returns Promise<Status>

  • get [status](): Status
  • Returns Status

Methods

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Parameters

    • event: Event

    Returns boolean

  • Read a notification

    Parameters

    • __namedParameters: {
          number?: number | "all";
          order?: "newest" | "oldest";
          tran?: DBTransaction;
          unread?: boolean;
      } = {}
      • Optional number?: number | "all"
      • Optional order?: "newest" | "oldest"
      • Optional tran?: DBTransaction
      • Optional unread?: boolean

    Returns Promise<Notification[]>

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Parameters

    • __namedParameters: {
          fresh?: boolean;
      } = {}
      • Optional fresh?: boolean

    Returns Promise<void>

Generated using TypeDoc