Class PipelineSimpleLock

java.lang.Object
org.apache.shardingsphere.data.pipeline.core.lock.PipelineSimpleLock

public final class PipelineSimpleLock extends Object
Pipeline simple lock.
  • Method Details

    • getInstance

      public static PipelineSimpleLock getInstance()
      Get instance.
      Returns:
      instance
    • tryLock

      public boolean tryLock(String lockName, long timeoutMills)
      Try to lock.
      Parameters:
      lockName - lock name
      timeoutMills - the maximum time in milliseconds to acquire lock
      Returns:
      true if lock got, else false
    • releaseLock

      public void releaseLock(String lockName)
      Release lock.
      Parameters:
      lockName - lock name