Svarog v3.0.4 which includes:
-
SvCluster (class for managing the cluster coordination and node lists) -
SvClusterServer (class for managing the heartbeat, logon, logoff, distributed locks) -
SvClusterNotifierServer (class for distribution of notifications (dirty objects, logoff, acknowledgments) between nodes) -
SvClusterClient (class for client communication with the Cluster Server) -
SvClusterNotifierClient (class for publishing notifications to the cluster: dirty objects, logoff, acknowledgments)
From end user perspective the only difference is the addition of two new methods in the SvLock class: 1. *
- getDistributedLock(String lockKey)
- releaseDistributedLock(int lockHash)
These two are required for acquiring cluster wide locks.
Cluster distributed locks
SvClusterServer supports pessimistic locks. Means that all nodes in the cluster shall confirm the lock before it is acquired. Locks shall be registered also on the worker nodes not only on the coordinator. This is used when a node upgrades to coordinator it keeps the list locks, just migrates all locks when a node joins.
Svarog Shutdown hooks
A Svarog Executor (SvExecutor) can be configured to be executed on shutdown. This is configured via the svarog.properties parameter svarog.shutdown.hook. The parameter shall contain list of executors, represented by complex key CATEGORY and NAME of shut down executors ({KEY}.{NAME}). Semicolon is the list separator.