class RedisServiceManager
- RedisServiceManager
- Clustering
- Reference
- Object
Defined in:
redis_service_manager.crredis_service_manager/node_hash.cr
Constant Summary
-
Log =
::Log.for("redis-service-manager")
Constructors
- .new(service : String, redis : String, uri : String = "", ttl : Int32 = 20)
- .new(service : String, redis : Redis::Client, uri : String = "", ttl : Int32 = 20, lock : Mutex = Mutex.new(:reentrant))
Instance Method Summary
- #cluster_ready? : Bool
- #cluster_size
- #finalize
- #generate_version
- #hash_key : String
- #leader? : Bool
-
#maintain_registration
Check if node is registered in the cluster either join cluster or maintain registration
-
#node_hash : Hash(String, URI)
returns a node_id => URI mapping
- #node_info : NodeInfo
- #node_key : String
- #node_keys : Array(String)
- #ready? : Bool
-
#register : Bool
registers this node with the cluster as a member
-
#registered? : Bool
is this node registered as part of the cluster
-
#rendezvous : RendezvousHash
returns the list of known nodes
- #simulate_crash : Nil
- #simulate_split_brain(&recovered) : Nil
-
#ulid : String
the id of the node
-
#unregister : Bool
removes this node from the cluster as a member
-
#uri : String
the service uri for this host
-
#watching? : Bool
is this class watching for changes to the cluster this should return true if registered returns true
Instance methods inherited from class Clustering
cluster_stable_callbacks : Array( -> )
cluster_stable_callbacks,
node_hash : Hash(String, URI)
node_hash,
on_cluster_stable(&callback : -> )
on_cluster_stable,
on_rebalance(&callback : RendezvousHash, RebalanceComplete -> )
on_rebalance,
rebalance_callbacks : Array(RendezvousHash, RebalanceComplete -> )
rebalance_callbacks,
register : Bool
register,
registered? : Bool
registered?,
rendezvous : RendezvousHash
rendezvous,
service : String
service,
ulid : String
ulid,
unregister : Bool
unregister,
uri : String
uri,
version : String
version,
watching? : Bool
watching?
Constructor methods inherited from class Clustering
new(service : String)
new
Constructor Detail
Instance Method Detail
Check if node is registered in the cluster either join cluster or maintain registration
returns a node_id => URI mapping
registers this node with the cluster as a member
is this node registered as part of the cluster
returns the list of known nodes
removes this node from the cluster as a member
is this class watching for changes to the cluster this should return true if registered returns true