Home > @imqueue/core > ClusterManager
ClusterManager class
Abstract base for cluster-membership discovery. A manager tracks the clusters it feeds and pushes server add/remove events into each of them, so several clustered queues can share one discovery mechanism.
Supply instances through IMQOptions.clusterManagers. UDPClusterManager is the implementation shipped with the framework.
Signature:
export declare abstract class ClusterManager
Remarks
Subclasses must implement ClusterManager.destroy() to release their transport, and that implementation must be idempotent — remove() can invoke it more than once.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
Clusters currently registered with this manager. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Releases the manager's transport. Implemented by subclasses, and must be safe to call more than once. | |
|
Applies the given callback to every registered cluster. Each cluster is handled independently: a callback that throws (synchronously or asynchronously) for one cluster never prevents the remaining clusters from being processed. | ||
|
Registers a cluster's membership callbacks with this manager and returns an identified handle. | ||
|
Unregisters a cluster from this manager. |