Options
All
  • Public
  • Public/Protected
  • All
Menu

Handles leader election mechanism for browser

Hierarchy

  • CXoneLeaderElector

Index

Constructors

  • Constructor to create singleton instance of CXoneLeaderElector

    Returns CXoneLeaderElector

Properties

elector: LeaderElector
isActiveLeader: boolean
leaderChannel: BroadcastChannel<any>
onLeaderChanged: Subject<boolean>

Accessors

  • get isLeader(): boolean
  • Checks if instance is leader or not

    example
    const isLeader = this.isActiveLeader;
    

    Returns boolean

  • Static method to control the access of the singleton instance.

    example
    const leaderElection = CXoneLeaderElector.instance;
    

    Returns CXoneLeaderElector

Methods

  • start(): void
  • Provides leader election mechanism for within multiple browser instances

    example
    CXoneLeaderElector.instance.start();
    

    Returns void

Generated using TypeDoc