class LockCleaner extends ServerLockCleaner {

  public boolean tryToCleanLock(ThemisLock lock) throws IOException {
    if (lock.getColumn() == null) {
      throw new ThemisFatalException("column of lock should not be null for clean, lock=" + lock);
    }
    for (int current = 0; current < retry; ++current) {
      if (this.shouldCleanLock(lock)) {
        this.cleanLock(lock);
        return true;
      }
      if (current + 1 < retry) {
        LOG.warn("sleep " + pause + " to clean lock, current=" + current + ", retry=" + retry
            + ", clientLockTTL=" + clientLockTTl + ", type=" + TransactionTTL.timestampType);
        Threads.sleep(pause);
        // must check expired between retry
        checkLockExpired(lock, cpClient, clientLockTTl);
      }
    }
    // check the whether the lock has been cleaned by other transaction
    if (hasLock(lock)) {
      throw new LockConflictException("lock can't be cleaned after retry=" + retry + ", column="
          + lock.getColumn() + ", prewriteTs=" + lock.getTimestamp());
    } else {
      LOG.warn("lock has been clean by other transaction, lock=" + lock);
    }
    return false;
  }

  public  LockCleaner(Configuration conf, HConnection conn, WorkerRegister register,
      ThemisCoprocessorClient cpClient);

}