class

LavinMQ::Clustering::Client

Inherits Reference < Object

Constants

ACK_BUFFER_CAPACITY = 8192

Capacity of the channel buffering acks from the stream-reading fiber to the ack-sending fiber. Only bounds an in-process queue (send_ack_loop drains and coalesces it continuously), so a fixed size is fine; the leader's ack deadline, not this, governs how far a follower may lag.

BUFFER_SIZE = 64 * 1024

Buffer used when streaming replicated file changes to disk. Matches LZ4::Reader's internal 64 KiB buffer.

HASH_YIELD_INTERVAL = 32

Files #hash_local_files hashes between Fiber.yields; a yield per (often tiny) file costs more than it gives back.

Log = LavinMQ::Log.for("clustering.client")

Constructors

new(config : Config, id : Int32, password : String, proxy = true)
Source

Instance methods

close

On promotion both the leader watcher and the controller close the client, and the controller binds the listeners as soon as its call returns, so a call made while another is closing waits for it to finish.

Source
follow(host : String, port : Int32)
Source
follow(uri : String)
Source
follow(uri : URI)
Source
follows?(host : String, port : Int32) : Bool
Source
follows?(_nil : Nil) : Bool
Source
follows?(uri : String) : Bool
Source
follows?(uri : URI) : Bool
Source
streamed_bytes
Source

Nested types