Class TraceEventHelper

java.lang.Object
org.jboss.jca.as.tracer.TraceEventHelper

public class TraceEventHelper extends Object
Helper class for TraceEvent
  • Constructor Details

    • TraceEventHelper

      public TraceEventHelper()
  • Method Details

    • filterPoolEvents

      public static List<TraceEvent> filterPoolEvents(List<TraceEvent> data) throws Exception
      Filter the pool events
      Parameters:
      data - The data
      Returns:
      The filtered events
      Throws:
      Exception - If an error occurs
    • filterLifecycleEvents

      public static Map<String,List<TraceEvent>> filterLifecycleEvents(List<TraceEvent> data) throws Exception
      Filter the lifecycle events
      Parameters:
      data - The data
      Returns:
      The filtered events
      Throws:
      Exception - If an error occurs
    • filterCCMEvents

      public static List<TraceEvent> filterCCMEvents(List<TraceEvent> data) throws Exception
      Filter the CCM events
      Parameters:
      data - The data
      Returns:
      The filtered events
      Throws:
      Exception - If an error occurs
    • filterCCMPoolEvents

      public static Map<String,List<TraceEvent>> filterCCMPoolEvents(List<TraceEvent> data) throws Exception
      Filter the CCM pool events
      Parameters:
      data - The data
      Returns:
      The filtered events
      Throws:
      Exception - If an error occurs
    • poolManagedConnectionPools

      public static Map<String,Set<String>> poolManagedConnectionPools(List<TraceEvent> data) throws Exception
      Pool to Managed Connection Pools mapping
      Parameters:
      data - The data
      Returns:
      The mapping
      Throws:
      Exception - If an error occurs
    • tocConnections

      public static Map<String,List<TraceEvent>> tocConnections(List<TraceEvent> data) throws Exception
      ToC: Connections
      Parameters:
      data - The data
      Returns:
      The events
      Throws:
      Exception - If an error occurs
    • tocManagedConnections

      public static Map<String,TraceEvent> tocManagedConnections(List<TraceEvent> data) throws Exception
      ToC: Managed connections
      Parameters:
      data - The data
      Returns:
      The events
      Throws:
      Exception - If an error occurs
    • tocConnectionListeners

      public static Map<String,List<TraceEvent>> tocConnectionListeners(List<TraceEvent> data) throws Exception
      ToC: Connection listeners
      Parameters:
      data - The data
      Returns:
      The events
      Throws:
      Exception - If an error occurs
    • tocManagedConnectionPools

      public static Map<String,List<TraceEvent>> tocManagedConnectionPools(List<TraceEvent> data) throws Exception
      ToC: Managed Connection Pools
      Parameters:
      data - The data
      Returns:
      The events
      Throws:
      Exception - If an error occurs
    • getEvents

      public static List<TraceEvent> getEvents(FileReader fr, File directory) throws Exception
      Get the events
      Parameters:
      fr - The file reader
      directory - The directory
      Returns:
      The events
      Throws:
      Exception - If an error occurs
    • getStatus

      public static Map<String,TraceEventStatus> getStatus(Map<String,List<TraceEvent>> input, boolean ignoreDelist, boolean ignoreTracking, boolean ignoreIncomplete)
      Get status
      Parameters:
      input - The input
      ignoreDelist - Should DELIST be ignored
      ignoreTracking - Should TRACKING be ignored
      ignoreIncomplete - Ignore incomplete traces
      Returns:
      The overall result
    • getStatus

      public static TraceEventStatus getStatus(List<TraceEvent> data, boolean ignoreDelist, boolean ignoreTracking, boolean ignoreIncomplete)
      Get status
      Parameters:
      data - The data
      ignoreDelist - Should DELIST be ignored
      ignoreTracking - Should TRACKING be ignored
      ignoreIncomplete - Ignore incomplete traces
      Returns:
      The status
    • mergeStatus

      public static TraceEventStatus mergeStatus(Collection<TraceEventStatus> data)
      Get status
      Parameters:
      data - The data
      Returns:
      The status
    • isStartState

      public static boolean isStartState(TraceEvent te)
      Is start state
      Parameters:
      te - The event
      Returns:
      The value
    • isEndState

      public static boolean isEndState(TraceEvent te)
      Is end state
      Parameters:
      te - The event
      Returns:
      The value
    • isRed

      public static boolean isRed(TraceEvent te)
      Is red
      Parameters:
      te - The event
      Returns:
      The value
    • isYellow

      public static boolean isYellow(TraceEvent te)
      Is yellow
      Parameters:
      te - The event
      Returns:
      The value
    • getPoolData

      public static Map<String,List<Interaction>> getPoolData(List<TraceEvent> data, boolean ignoreDelist, boolean ignoreTracking, boolean ignoreIncomplete)
      Get the structured pool data
      Parameters:
      data - The data
      ignoreDelist - Should DELIST be ignored
      ignoreTracking - Should TRACKING be ignored
      ignoreIncomplete - Ignore incomplete traces
      Returns:
      The result
    • getConnectionListenerData

      public static Map<String,List<Interaction>> getConnectionListenerData(List<Interaction> data)
      Get a connection listener map
      Parameters:
      data - The data
      Returns:
      The result
    • getTransactionData

      public static Map<String,List<Interaction>> getTransactionData(List<Interaction> data)
      Get a transaction map
      Parameters:
      data - The data
      Returns:
      The result
    • hasException

      public static boolean hasException(List<TraceEvent> events)
      Has an exception event
      Parameters:
      events - The events
      Returns:
      True if there is an exception
    • exceptionDescription

      public static String exceptionDescription(String encoded)
      Get exception description
      Parameters:
      encoded - The encoded string
      Returns:
      The string
    • prettyPrint

      public static String prettyPrint(TraceEvent te)
      Pretty print event
      Parameters:
      te - The event
      Returns:
      The string
    • getVersion

      public static TraceEvent getVersion(List<TraceEvent> events)
      Get the version
      Parameters:
      events - The events
      Returns:
      The version information
    • getCCMStatus

      public static TraceEventStatus getCCMStatus(List<TraceEvent> data, boolean ignoreIncomplete)
      Get CCM pool status
      Parameters:
      data - The data
      ignoreIncomplete - Ignore incomplete stacks
      Returns:
      The status
    • getCCMPoolStatus

      public static TraceEventStatus getCCMPoolStatus(List<TraceEvent> data, boolean ignoreIncomplete)
      Get CCM pool status
      Parameters:
      data - The data
      ignoreIncomplete - Ignore incomplete stacks
      Returns:
      The status
    • getType

      public static TraceEvent getType(List<TraceEvent> events, int... types)
      Get a specific event type
      Parameters:
      events - The events
      types - The types
      Returns:
      The first event type found; otherwise null if none
    • getType

      public static TraceEvent getType(List<TraceEvent> events, String identifier, int... types)
      Get a specific event type
      Parameters:
      events - The events
      identifier - The connection listener
      types - The types
      Returns:
      The first event type found; otherwise null if none