Package: effect
Module: HashRing
Checks whether the ring contains a node with the same PrimaryKey value.
When to use
Use when you need to know whether registering a node would update an existing ring member because another node already has the same primary-key identity.
Details
Membership is checked with self.nodes.has(PrimaryKey.value(node)), so
matching is by primary key, not object identity or weight.
See
add for registering or updating nodesremove for removing nodes by the same primary-key identityget for routing an input string to a nodeSignature
declare const has: { <A extends PrimaryKey.PrimaryKey>(node: A): (self: HashRing<A>) => boolean; <A extends PrimaryKey.PrimaryKey>(self: HashRing<A>, node: A): boolean; }
Since v3.19.0