code: private static String getSegmentBaseName(String segmentQualifiedName) {
          int endOfStreamNamePos = segmentQualifiedName.lastIndexOf(TRANSACTION_DELIMITER);
          if (endOfStreamNamePos < 0 || endOfStreamNamePos + TRANSACTION_DELIMITER.length() + TRANSACTION_ID_LENGTH > segmentQualifiedName.length()) {
              //not a transaction segment.
              return segmentQualifiedName;
          }
          //transaction segment: only return the portion before transaction delimiter.
          return segmentQualifiedName.substring(0, endOfStreamNamePos);
      }
docs: Get base name of segment with the potential transaction delimiter removed.
  @param segmentQualifiedName fully qualified segment name.
  @return the base name of segment.