public static String getParentStreamSegmentName ( String transactionName ) { // Check to see if the given name is a properly formatted Transaction. int endOfStreamNamePos = transactionName . lastIndexOf ( TRANSACTION_DELIMITER ) ; if ( endOfStreamNamePos < 0 || endOfStreamNamePos + TRANSACTION_DELIMITER . length ( ) + TRANSACTION_ID_LENGTH > transactionName . length ( ) ) { // Improperly formatted Transaction name. return null ; } return transactionName . substring ( 0 , endOfStreamNamePos ) ; }
Attempts to extract the name of the Parent StreamSegment for the given Transaction StreamSegment . This method returns a valid value only if the Transaction StreamSegmentName was generated using the generateTransactionStreamSegmentName method .