| java.lang.Object com.mysql.jdbc.profiler.ProfilerEvent
ProfilerEvent | public class ProfilerEvent (Code) | | author: mmatthew |
Constructor Summary | |
public | ProfilerEvent(byte eventType, String hostName, String catalog, long connectionId, int statementId, int resultSetId, long eventCreationTime, long eventDuration, String durationUnits, String eventCreationPointDesc, Throwable eventCreationPoint, String message) |
TYPE_EXECUTE | final public static byte TYPE_EXECUTE(Code) | | Profiler event for prepared statements being executed
|
TYPE_FETCH | final public static byte TYPE_FETCH(Code) | | Profiler event for result sets being retrieved
|
TYPE_OBJECT_CREATION | final public static byte TYPE_OBJECT_CREATION(Code) | | Profiler creating object type event
|
TYPE_PREPARE | final public static byte TYPE_PREPARE(Code) | | Profiler event for prepared statements being prepared
|
TYPE_QUERY | final public static byte TYPE_QUERY(Code) | | Profiler event for a query being executed
|
TYPE_SLOW_QUERY | final public static byte TYPE_SLOW_QUERY(Code) | | Profiler event for slow query
|
TYPE_WARN | final public static byte TYPE_WARN(Code) | | A Profiler warning event
|
catalog | protected String catalog(Code) | | The catalog the event occurred on
|
catalogIndex | protected int catalogIndex(Code) | | The catalog the event occurred on (as an index into a dictionary, used by
'remote' profilers for efficiency)?
|
connectionId | protected long connectionId(Code) | | Associated connection (-1 for none)
|
durationUnits | protected String durationUnits(Code) | | What units was the duration measured in?
|
eventCreationPoint | protected Throwable eventCreationPoint(Code) | | Where was the event created (as a Throwable)?
|
eventCreationPointDesc | protected String eventCreationPointDesc(Code) | | Where was the event created (as a string description of the
eventCreationPoint)?
|
eventCreationPointIndex | protected int eventCreationPointIndex(Code) | | Where was the event created (as an index into a dictionary, used by
'remote' profilers for efficiency)?
|
eventCreationTime | protected long eventCreationTime(Code) | | When was the event created?
|
eventDuration | protected long eventDuration(Code) | | How long did the event last?
|
eventType | protected byte eventType(Code) | | Type of event
|
hostName | protected String hostName(Code) | | The hostname the event occurred on
|
hostNameIndex | protected int hostNameIndex(Code) | | The hostname the event occurred on (as an index into a dictionary, used
by 'remote' profilers for efficiency)?
|
message | protected String message(Code) | | Optional event message
|
resultSetId | protected int resultSetId(Code) | | Associated result set (-1 for none)
|
statementId | protected int statementId(Code) | | Associated statement (-1 for none)
|
ProfilerEvent | public ProfilerEvent(byte eventType, String hostName, String catalog, long connectionId, int statementId, int resultSetId, long eventCreationTime, long eventDuration, String durationUnits, String eventCreationPointDesc, Throwable eventCreationPoint, String message)(Code) | | Creates a new profiler event
Parameters: eventType - the event type (from the constants TYPE_????) Parameters: hostName - the hostname where the event occurs Parameters: catalog - the catalog in use Parameters: connectionId - the connection id (-1 if N/A) Parameters: statementId - the statement id (-1 if N/A) Parameters: resultSetId - the result set id (-1 if N/A) Parameters: eventCreationTime - when was the event created? Parameters: eventDurationMillis - how long did the event last? Parameters: eventCreationPointDesc - event creation point as a string Parameters: eventCreationPoint - event creation point as a Throwable Parameters: message - optional message |
getCatalog | public String getCatalog()(Code) | | Returns the catalog in use
the catalog in use |
getConnectionId | public long getConnectionId()(Code) | | Returns the id of the connection in use when this event was created.
the connection in use |
getDurationUnits | public String getDurationUnits()(Code) | | Returns the units for getEventDuration()
|
getEventCreationPoint | public Throwable getEventCreationPoint()(Code) | | Returns the point (as a Throwable stacktrace) where this event was
created.
the point where this event was created |
getEventCreationPointAsString | public String getEventCreationPointAsString()(Code) | | Returns the description of when this event was created.
a description of when this event was created. |
getEventCreationTime | public long getEventCreationTime()(Code) | | Returns the time (in System.currentTimeMillis() form) when this event was
created
the time this event was created |
getEventDuration | public long getEventDuration()(Code) | | Returns the duration of the event in milliseconds
the duration of the event in milliseconds |
getEventType | public byte getEventType()(Code) | | Returns the event type flag
the event type flag |
getMessage | public String getMessage()(Code) | | Returns the optional message for this event
the message stored in this event |
getResultSetId | public int getResultSetId()(Code) | | Returns the id of the result set in use when this event was created.
the result set in use |
getStatementId | public int getStatementId()(Code) | | Returns the id of the statement in use when this event was created.
the statement in use |
pack | public byte[] pack() throws Exception(Code) | | Creates a binary representation of this event.
a binary representation of this event throws: Exception - if an error occurs while packing this event. |
toString | public String toString()(Code) | | Returns a representation of this event as a String.
a String representation of this event. |
unpack | public static ProfilerEvent unpack(byte[] buf) throws Exception(Code) | | Unpacks a binary representation of this event.
Parameters: buf - the binary representation of this event the unpacked Event throws: Exception - if an error occurs while unpacking the event |
|
|