class ServerLockCleaner {

  public void cleanSecondaryLocks(PrimaryLock primaryLock, Long commitTs)
      throws IOException {
    for (Entry<ColumnCoordinate, Type> secondary : primaryLock.getSecondaryColumns().entrySet()) {
      if (commitTs == null) {
        eraseLockAndData(secondary.getKey(), primaryLock.getTimestamp());
      } else {
        ColumnCoordinate column = secondary.getKey();
        ColumnMutation columnMutation = new ColumnMutation(column, secondary.getValue(), null);
        cpClient.commitSecondaryRow(column.getTableName(), column.getRow(),
          Lists.newArrayList(columnMutation), primaryLock.getTimestamp(), commitTs);
      }
    }
  }

  public  ServerLockCleaner(HConnection conn, ThemisCoprocessorClient cpClient);

}