Class DynModelProperties.Cluster

java.lang.Object
io.jmix.dynmodel.DynModelProperties.Cluster
Enclosing class:
DynModelProperties

public static class DynModelProperties.Cluster extends Object
Configuration properties for dynamic model cluster support.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the age at which an apply lock left by a crashed node is considered expired.
    int
    Returns how long the startup and catch-up paths wait for the apply lock.
    boolean
    Returns whether the applied model is propagated to other nodes of the cluster.
    void
    setApplyLockTimeoutSec(int applyLockTimeoutSec)
    Sets the age at which an apply lock left by a crashed node is considered expired.
    void
    setApplyLockWaitSec(int applyLockWaitSec)
    Sets how long the startup and catch-up paths wait for the apply lock.
    void
    setEnabled(boolean enabled)
    Sets whether the applied model is propagated to other nodes of the cluster.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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