Package io.jmix.dynmodel
Class DynModelProperties.Cluster
java.lang.Object
io.jmix.dynmodel.DynModelProperties.Cluster
- Enclosing class:
DynModelProperties
Configuration properties for dynamic model cluster support.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the age at which an apply lock left by a crashed node is considered expired.intReturns how long the startup and catch-up paths wait for the apply lock.booleanReturns whether the applied model is propagated to other nodes of the cluster.voidsetApplyLockTimeoutSec(int applyLockTimeoutSec) Sets the age at which an apply lock left by a crashed node is considered expired.voidsetApplyLockWaitSec(int applyLockWaitSec) Sets how long the startup and catch-up paths wait for the apply lock.voidsetEnabled(boolean enabled) Sets whether the applied model is propagated to other nodes of the cluster.
-
Constructor Details
-
Cluster
public Cluster()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether the applied model is propagated to other nodes of the cluster.- Returns:
- true if cluster support is enabled
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the applied model is propagated to other nodes of the cluster.- Parameters:
enabled- true to enable cluster support
-
getApplyLockTimeoutSec
public int getApplyLockTimeoutSec()Returns the age at which an apply lock left by a crashed node is considered expired.The lock is evicted purely by age, with no heartbeat, so this value must be greater than the longest apply the application can produce. An apply that is still running when its lock expires is indistinguishable from a crashed node: another node takes the lock and applies at the same time, and the first node's release then removes the second node's lock.
- Returns:
- lock timeout in seconds
-
setApplyLockTimeoutSec
public void setApplyLockTimeoutSec(int applyLockTimeoutSec) Sets the age at which an apply lock left by a crashed node is considered expired. Must be greater than the longest apply the application can produce.- Parameters:
applyLockTimeoutSec- lock timeout in seconds
-
getApplyLockWaitSec
public int getApplyLockWaitSec()Returns how long the startup and catch-up paths wait for the apply lock.- Returns:
- wait time in seconds
-
setApplyLockWaitSec
public void setApplyLockWaitSec(int applyLockWaitSec) Sets how long the startup and catch-up paths wait for the apply lock.- Parameters:
applyLockWaitSec- wait time in seconds
-