Class ProfilerEventImpl

java.lang.Object
com.mysql.cj.log.ProfilerEventImpl
All Implemented Interfaces:
ProfilerEvent

public class ProfilerEventImpl
extends java.lang.Object
implements ProfilerEvent
  • Field Summary

  • Constructor Summary

    Constructors 
    Constructor Description
    ProfilerEventImpl​(byte eventType, java.lang.String hostName, java.lang.String db, long connectionId, int statementId, int resultSetId, long eventDuration, java.lang.String durationUnits, java.lang.Throwable eventCreationPoint, java.lang.String message)
    Creates a new profiler event
  • Method Summary

    Modifier and Type Method Description
    long getConnectionId()
    Returns the id of the associated connection (-1 for none).
    java.lang.String getDatabase()
    Returns the database the event occurred on.
    java.lang.String getDurationUnits()
    Returns the units for getEventDuration()
    java.lang.String getEventCreationPointAsString()
    Returns the description of where the event was created.
    long getEventCreationTime()
    Returns the time (in System.currentTimeMillis() form) when this event was created.
    long getEventDuration()
    Returns the duration of the event in milliseconds
    byte getEventType()
    Returns the event type
    java.lang.String getHostName()
    Returns the host name the event occurred on.
    java.lang.String getMessage()
    Returns the optional message for this event
    int getResultSetId()
    Returns the id of the associated result set (-1 for none).
    int getStatementId()
    Returns the id of the associated statement (-1 for none).
    byte[] pack()
    Creates a binary representation of this event.
    java.lang.String toString()
    Returns a representation of this event as a String.
    static ProfilerEvent unpack​(byte[] buf)
    Unpacks a binary representation of this event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProfilerEventImpl

      public ProfilerEventImpl​(byte eventType, java.lang.String hostName, java.lang.String db, long connectionId, int statementId, int resultSetId, long eventDuration, java.lang.String durationUnits, java.lang.Throwable eventCreationPoint, java.lang.String message)
      Creates a new profiler event
      Parameters:
      eventType - the event type (from the constants TYPE_????)
      hostName - the hostname where the event occurs
      db - the database in use
      connectionId - the connection id (-1 if N/A)
      statementId - the statement id (-1 if N/A)
      resultSetId - the result set id (-1 if N/A)
      eventDuration - how long did the event last?
      durationUnits - time units user for eventDuration
      eventCreationPoint - event creation point as a Throwable
      message - optional message
  • Method Details