public boolean refreshLockResource(String dbName, String tableName, long txnId) {
    final ResourceLock prevResourceLock = locks.get(Warehouse.getQualifiedName(dbName, tableName));
    if (prevResourceLock == null || prevResourceLock.txnId != txnId ||
        prevResourceLock.state.get() != State.ACQUIRED) {
      // Lock was outdated and it was removed (then maybe another transaction picked it up)
      // or changed its state
      return false;
    }
    prevResourceLock.lastHeartBeatTime.set(System.currentTimeMillis());
    return true;
  }
Heartbeats a certain lock and refreshes its timer.
@param dbName the db name of the materialization
@param tableName the table name of the materialization
@param txnId the transaction id for the rebuild
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MaterializationsRebuildLockHandler.java