class LockCleaner extends ServerLockCleaner {

  public static void checkLockExpired(ThemisLock lock, ThemisCoprocessorClient cpClient,
      int clientLockTTL) throws IOException {
    if (clientLockTTL == 0) {
      // TODO : get lock expired in server side for the first time to check ttl
      lock.setLockExpired(cpClient.isLockExpired(lock.getColumn().getTableName(), lock.getColumn()
          .getRow(), lock.getTimestamp()));
    } else {
      lock.setLockExpired(TransactionTTL.isLockExpired(lock.getTimestamp(), clientLockTTL));
      LOG.info("check lock expired by client lock ttl, lock=" + lock + ", clientLockTTL="
          + clientLockTTL + ", type=" + TransactionTTL.timestampType);
    }
  }

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

}