|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.profiler.ProfilerEvent
public class ProfilerEvent
Field Summary | |
---|---|
protected java.lang.String |
catalog
The catalog the event occurred on |
protected int |
catalogIndex
The catalog the event occurred on (as an index into a dictionary, used by 'remote' profilers for efficiency)? |
protected long |
connectionId
Associated connection (-1 for none) |
protected java.lang.String |
durationUnits
What units was the duration measured in? |
protected java.lang.Throwable |
eventCreationPoint
Where was the event created (as a Throwable)? |
protected java.lang.String |
eventCreationPointDesc
Where was the event created (as a string description of the eventCreationPoint)? |
protected int |
eventCreationPointIndex
Where was the event created (as an index into a dictionary, used by 'remote' profilers for efficiency)? |
protected long |
eventCreationTime
When was the event created? |
protected long |
eventDuration
How long did the event last? |
protected byte |
eventType
Type of event |
protected java.lang.String |
hostName
The hostname the event occurred on |
protected int |
hostNameIndex
The hostname the event occurred on (as an index into a dictionary, used by 'remote' profilers for efficiency)? |
protected java.lang.String |
message
Optional event message |
protected int |
resultSetId
Associated result set (-1 for none) |
protected int |
statementId
Associated statement (-1 for none) |
static byte |
TYPE_EXECUTE
Profiler event for prepared statements being executed |
static byte |
TYPE_FETCH
Profiler event for result sets being retrieved |
static byte |
TYPE_OBJECT_CREATION
Profiler creating object type event |
static byte |
TYPE_PREPARE
Profiler event for prepared statements being prepared |
static byte |
TYPE_QUERY
Profiler event for a query being executed |
static byte |
TYPE_SLOW_QUERY
Profiler event for slow query |
static byte |
TYPE_WARN
A Profiler warning event |
Constructor Summary | |
---|---|
ProfilerEvent(byte eventType,
java.lang.String hostName,
java.lang.String catalog,
long connectionId,
int statementId,
int resultSetId,
long eventCreationTime,
long eventDuration,
java.lang.String durationUnits,
java.lang.String eventCreationPointDesc,
java.lang.Throwable eventCreationPoint,
java.lang.String message)
Creates a new profiler event |
Method Summary | |
---|---|
java.lang.String |
getCatalog()
Returns the catalog in use |
long |
getConnectionId()
Returns the id of the connection in use when this event was created. |
java.lang.String |
getDurationUnits()
Returns the units for getEventDuration() |
java.lang.Throwable |
getEventCreationPoint()
Returns the point (as a Throwable stacktrace) where this event was created. |
java.lang.String |
getEventCreationPointAsString()
Returns the description of when this 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 flag |
java.lang.String |
getMessage()
Returns the optional message for this event |
int |
getResultSetId()
Returns the id of the result set in use when this event was created. |
int |
getStatementId()
Returns the id of the statement in use when this event was created. |
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 |
Field Detail |
---|
public static final byte TYPE_WARN
public static final byte TYPE_OBJECT_CREATION
public static final byte TYPE_PREPARE
public static final byte TYPE_QUERY
public static final byte TYPE_EXECUTE
public static final byte TYPE_FETCH
public static final byte TYPE_SLOW_QUERY
protected byte eventType
protected long connectionId
protected int statementId
protected int resultSetId
protected long eventCreationTime
protected long eventDuration
protected java.lang.String durationUnits
protected int hostNameIndex
protected java.lang.String hostName
protected int catalogIndex
protected java.lang.String catalog
protected int eventCreationPointIndex
protected java.lang.Throwable eventCreationPoint
protected java.lang.String eventCreationPointDesc
protected java.lang.String message
Constructor Detail |
---|
public ProfilerEvent(byte eventType, java.lang.String hostName, java.lang.String catalog, long connectionId, int statementId, int resultSetId, long eventCreationTime, long eventDuration, java.lang.String durationUnits, java.lang.String eventCreationPointDesc, java.lang.Throwable eventCreationPoint, java.lang.String message)
eventType
- the event type (from the constants TYPE_????)hostName
- the hostname where the event occurscatalog
- the catalog in useconnectionId
- the connection id (-1 if N/A)statementId
- the statement id (-1 if N/A)resultSetId
- the result set id (-1 if N/A)eventCreationTime
- when was the event created?eventDurationMillis
- how long did the event last?eventCreationPointDesc
- event creation point as a stringeventCreationPoint
- event creation point as a Throwablemessage
- optional messageMethod Detail |
---|
public java.lang.String getEventCreationPointAsString()
public java.lang.String toString()
toString
in class java.lang.Object
public static ProfilerEvent unpack(byte[] buf) throws java.lang.Exception
buf
- the binary representation of this event
java.lang.Exception
- if an error occurs while unpacking the eventpublic byte[] pack() throws java.lang.Exception
java.lang.Exception
- if an error occurs while packing this event.public java.lang.String getCatalog()
public long getConnectionId()
public java.lang.Throwable getEventCreationPoint()
public long getEventCreationTime()
public long getEventDuration()
public java.lang.String getDurationUnits()
public byte getEventType()
public int getResultSetId()
public int getStatementId()
public java.lang.String getMessage()
|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |