class LavinMQ::DataDirLock

Overview

Make sure that only one instance is using the data directory Can work as a poor mans cluster where the master nodes acquires a file lock on a shared file system like NFS

Defined in:

lavinmq/data_dir_lock.cr

Constant Summary

Log = LavinMQ::Log.for("data_dir_lock")

Constructors

Instance Method Summary

Constructor Detail

def self.new(data_dir) #

[View source]

Instance Method Detail

def acquire #

[View source]
def poll #

Read from the lock file to detect lost lock See "Lost locks" in man 2 fcntl


[View source]
def release #

[View source]