程序包 com.mysql.cj.log
接口 ProfilerEvent
-
- 所有已知实现类:
ProfilerEventImpl
public interface ProfilerEvent
-
-
字段概要
字段 修饰符和类型 字段 说明 static byteNANot available value.static byteTYPE_EXECUTEProfiler event for prepared statements being executedstatic byteTYPE_FETCHProfiler event for result sets being retrievedstatic byteTYPE_OBJECT_CREATIONProfiler creating object type eventstatic byteTYPE_PREPAREProfiler event for prepared statements being preparedstatic byteTYPE_QUERYProfiler event for a query being executedstatic byteTYPE_SLOW_QUERYProfiler event for slow querystatic byteTYPE_USAGEProfiler event for usage advisor
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 longgetConnectionId()Returns the id of the associated connection (-1 for none).StringgetDatabase()Returns the database the event occurred on.StringgetDurationUnits()Returns the units for getEventDuration()StringgetEventCreationPointAsString()Returns the description of where the event was created.longgetEventCreationTime()Returns the time (in System.currentTimeMillis() form) when this event was created.longgetEventDuration()Returns the duration of the event in millisecondsbytegetEventType()Returns the event typeStringgetHostName()Returns the host name the event occurred on.StringgetMessage()Returns the optional message for this eventintgetResultSetId()Returns the id of the associated result set (-1 for none).intgetStatementId()Returns the id of the associated statement (-1 for none).byte[]pack()Creates a binary representation of this event.
-
-
-
字段详细资料
-
TYPE_USAGE
static final byte TYPE_USAGE
Profiler event for usage advisor- 另请参阅:
- 常量字段值
-
TYPE_OBJECT_CREATION
static final byte TYPE_OBJECT_CREATION
Profiler creating object type event- 另请参阅:
- 常量字段值
-
TYPE_PREPARE
static final byte TYPE_PREPARE
Profiler event for prepared statements being prepared- 另请参阅:
- 常量字段值
-
TYPE_QUERY
static final byte TYPE_QUERY
Profiler event for a query being executed- 另请参阅:
- 常量字段值
-
TYPE_EXECUTE
static final byte TYPE_EXECUTE
Profiler event for prepared statements being executed- 另请参阅:
- 常量字段值
-
TYPE_FETCH
static final byte TYPE_FETCH
Profiler event for result sets being retrieved- 另请参阅:
- 常量字段值
-
TYPE_SLOW_QUERY
static final byte TYPE_SLOW_QUERY
Profiler event for slow query- 另请参阅:
- 常量字段值
-
NA
static final byte NA
Not available value.- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getEventType
byte getEventType()
Returns the event type- 返回:
- the event type
-
getHostName
String getHostName()
Returns the host name the event occurred on.- 返回:
- host name
-
getDatabase
String getDatabase()
Returns the database the event occurred on.- 返回:
- the database in use
-
getConnectionId
long getConnectionId()
Returns the id of the associated connection (-1 for none).- 返回:
- the connection in use
-
getStatementId
int getStatementId()
Returns the id of the associated statement (-1 for none).- 返回:
- the statement in use
-
getResultSetId
int getResultSetId()
Returns the id of the associated result set (-1 for none).- 返回:
- the result set in use
-
getEventCreationTime
long getEventCreationTime()
Returns the time (in System.currentTimeMillis() form) when this event was created.- 返回:
- the time this event was created
-
getEventDuration
long getEventDuration()
Returns the duration of the event in milliseconds- 返回:
- the duration of the event in milliseconds
-
getDurationUnits
String getDurationUnits()
Returns the units for getEventDuration()- 返回:
- name of duration units
-
getEventCreationPointAsString
String getEventCreationPointAsString()
Returns the description of where the event was created.- 返回:
- a description of where this event was created.
-
getMessage
String getMessage()
Returns the optional message for this event- 返回:
- the message stored in this event
-
pack
byte[] pack()
Creates a binary representation of this event.- 返回:
- a binary representation of this event
-
-