Class LockConfig.LockConfigBuilder

    • Field Detail

      • pollingInterval

        protected java.time.Duration pollingInterval
      • timeout

        protected java.time.Duration timeout
      • clientId

        protected java.lang.String clientId
      • unlockOnFailure

        protected boolean unlockOnFailure
    • Constructor Detail

      • LockConfigBuilder

        protected LockConfigBuilder()
    • Method Detail

      • withPollingInterval

        public LockConfig.LockConfigBuilder withPollingInterval​(java.time.Duration pollingInterval)
        Duration to wait after each attempt to acquire the lock.
        Parameters:
        pollingInterval - defaults to 500 milliseconds.
        Returns:
        this
        Throws:
        java.lang.IllegalArgumentException - if value is less than 0
      • withTimeout

        public LockConfig.LockConfigBuilder withTimeout​(java.time.Duration timeout)
        Duration to attempt to acquire lock for.
        Parameters:
        timeout - defaults to 1 minute
        Returns:
        this
        Throws:
        java.lang.IllegalArgumentException - if value is less than 0
      • unlockOnFailure

        public LockConfig.LockConfigBuilder unlockOnFailure()
        Release the lock in case of failure. Note: default behavior is to leave the lock behind if any failures occurred during migration. This was done to prevent accidental data corruption and bring manual attention to the problem. Use 'unlockOnFailure' to override the default behavior and force cqlmigrate to release the lock.
        Returns:
        this