类 TimeTrackingPacketSender
- java.lang.Object
-
- com.mysql.cj.protocol.a.TimeTrackingPacketSender
-
- 所有已实现的接口:
MessageSender<NativePacketPayload>,PacketSentTimeHolder
public class TimeTrackingPacketSender extends Object implements MessageSender<NativePacketPayload>, PacketSentTimeHolder
AMessageSenderwhich tracks the last time a packet was sent.
-
-
构造器概要
构造器 构造器 说明 TimeTrackingPacketSender(MessageSender<NativePacketPayload> packetSender)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 longgetLastPacketSentTime()Returns the send time of a very recent packet.longgetPreviousPacketSentTime()Returns the send time of a previous packet.voidsend(byte[] packet, int packetLen, byte packetSequence)Synchronously send the message to server.MessageSender<NativePacketPayload>undecorate()Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.MessageSender<NativePacketPayload>undecorateAll()Return a PacketSender instance free of decorators.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.protocol.MessageSender
send, send, setMaxAllowedPacket
-
-
-
-
构造器详细资料
-
TimeTrackingPacketSender
public TimeTrackingPacketSender(MessageSender<NativePacketPayload> packetSender)
-
-
方法详细资料
-
send
public void send(byte[] packet, int packetLen, byte packetSequence) throws IOException从接口复制的说明:MessageSenderSynchronously send the message to server.- 指定者:
send在接口中MessageSender<NativePacketPayload>- 参数:
packet- byte array containing a messagepacketLen- length of the messagepacketSequence- message sequence index (used in a native protocol)- 抛出:
IOException- if an error occurs
-
getLastPacketSentTime
public long getLastPacketSentTime()
从接口复制的说明:PacketSentTimeHolderReturns the send time of a very recent packet. Should be used in exception generation when the send operation failed.- 指定者:
getLastPacketSentTime在接口中PacketSentTimeHolder- 返回:
- very recent packet send time
-
getPreviousPacketSentTime
public long getPreviousPacketSentTime()
从接口复制的说明:PacketSentTimeHolderReturns the send time of a previous packet. Should be used in exception generation when the send operation was successful but the following read operation failed.- 指定者:
getPreviousPacketSentTime在接口中PacketSentTimeHolder- 返回:
- previous packet send time
-
undecorateAll
public MessageSender<NativePacketPayload> undecorateAll()
从接口复制的说明:MessageSenderReturn a PacketSender instance free of decorators.- 指定者:
undecorateAll在接口中MessageSender<NativePacketPayload>- 返回:
MessageSenderinstance
-
undecorate
public MessageSender<NativePacketPayload> undecorate()
从接口复制的说明:MessageSenderReturn the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.- 指定者:
undecorate在接口中MessageSender<NativePacketPayload>- 返回:
MessageSenderinstance
-
-