code: public boolean matchesGlobalId(byte[] globalTransactionId) {
          if (globalTransactionId.length != Xid.MAXGTRIDSIZE) {
              return false;
          }
          for (int i = 8; i < globalTransactionId.length; i++) {
              if (globalTransactionId[i] != baseId[i]) {
                  return false;
              }
          }
          // for recovery, only match old transactions
          long id = extractLong(globalTransactionId, 0);
          return (id < start);
      }
docs: Checks whether or not the given byte array matches the global id.
  @param globalTransactionId the global transaction id
  @return true if it matches