程序包 com.mysql.cj.log

类 ProfilerEventImpl

    • 构造器详细资料

      • ProfilerEventImpl

        public ProfilerEventImpl​(byte eventType,
                                 String hostName,
                                 String db,
                                 long connectionId,
                                 int statementId,
                                 int resultSetId,
                                 long eventDuration,
                                 String durationUnits,
                                 Throwable eventCreationPoint,
                                 String message)
        Creates a new profiler event
        参数:
        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
    • 方法详细资料

      • getConnectionId

        public long getConnectionId()
        从接口复制的说明: ProfilerEvent
        Returns the id of the associated connection (-1 for none).
        指定者:
        getConnectionId 在接口中 ProfilerEvent
        返回:
        the connection in use
      • getStatementId

        public int getStatementId()
        从接口复制的说明: ProfilerEvent
        Returns the id of the associated statement (-1 for none).
        指定者:
        getStatementId 在接口中 ProfilerEvent
        返回:
        the statement in use
      • getResultSetId

        public int getResultSetId()
        从接口复制的说明: ProfilerEvent
        Returns the id of the associated result set (-1 for none).
        指定者:
        getResultSetId 在接口中 ProfilerEvent
        返回:
        the result set in use
      • getEventCreationTime

        public long getEventCreationTime()
        从接口复制的说明: ProfilerEvent
        Returns the time (in System.currentTimeMillis() form) when this event was created.
        指定者:
        getEventCreationTime 在接口中 ProfilerEvent
        返回:
        the time this event was created
      • getEventDuration

        public long getEventDuration()
        从接口复制的说明: ProfilerEvent
        Returns the duration of the event in milliseconds
        指定者:
        getEventDuration 在接口中 ProfilerEvent
        返回:
        the duration of the event in milliseconds
      • getMessage

        public String getMessage()
        从接口复制的说明: ProfilerEvent
        Returns the optional message for this event
        指定者:
        getMessage 在接口中 ProfilerEvent
        返回:
        the message stored in this event
      • toString

        public String toString()
        Returns a representation of this event as a String.
        覆盖:
        toString 在类中 Object
        返回:
        a String representation of this event.
      • unpack

        public static ProfilerEvent unpack​(byte[] buf)
        Unpacks a binary representation of this event.
        参数:
        buf - the binary representation of this event
        返回:
        the unpacked Event
      • pack

        public byte[] pack()
        从接口复制的说明: ProfilerEvent
        Creates a binary representation of this event.
        指定者:
        pack 在接口中 ProfilerEvent
        返回:
        a binary representation of this event