public abstract class AbstractPacketInputStream extends Object implements PacketInputStream
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
enableNetworkStatistics |
protected InputStream |
inputStream |
protected static int |
MAX_PACKET_SIZE |
protected int |
maxQuerySizeToLog |
protected int |
mysqlSeqNo |
protected static int |
REUSABLE_BUFFER_LENGTH |
protected byte[] |
reusableArray |
protected String |
serverThreadLog |
protected long |
threadId |
protected long |
timestampAfterRead |
protected TimeTrace |
timeTrace |
protected LruTraceCache |
traceCache |
| 构造器和说明 |
|---|
AbstractPacketInputStream() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearNetworkStatistics() |
void |
close() |
protected abstract void |
doTrace(int offset,
int length,
byte[] rawBytes) |
void |
enableNetworkStatistics(boolean flag) |
void |
endReceiveResponse(String sql) |
abstract int |
getCompressLastPacketSeq() |
int |
getLastPacketSeq() |
abstract Buffer |
getPacket(boolean reUsable) |
abstract byte[] |
getPacketArray(boolean reUsable) |
long |
getTimestampAfterRead() |
protected abstract void |
readMysqlStream(byte[] rawBytes,
int off,
int remaining) |
void |
setServerThreadId(long serverThreadId,
Boolean isMaster)
Set server thread id.
|
void |
setTraceCache(LruTraceCache traceCache) |
void |
startReceiveResponse() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLoggerprotected InputStream inputStream
protected long threadId
protected int mysqlSeqNo
protected LruTraceCache traceCache
protected String serverThreadLog
protected int maxQuerySizeToLog
protected boolean enableNetworkStatistics
protected long timestampAfterRead
protected static final int REUSABLE_BUFFER_LENGTH
protected static final int MAX_PACKET_SIZE
protected final byte[] reusableArray
protected TimeTrace timeTrace
public abstract Buffer getPacket(boolean reUsable) throws IOException
getPacket 在接口中 PacketInputStreamIOExceptionpublic abstract byte[] getPacketArray(boolean reUsable)
throws IOException
getPacketArray 在接口中 PacketInputStreamIOExceptionprotected abstract void readMysqlStream(byte[] rawBytes,
int off,
int remaining)
throws IOException
IOExceptionprotected abstract void doTrace(int offset,
int length,
byte[] rawBytes)
public int getLastPacketSeq()
getLastPacketSeq 在接口中 PacketInputStreampublic abstract int getCompressLastPacketSeq()
getCompressLastPacketSeq 在接口中 PacketInputStreampublic void close()
throws IOException
close 在接口中 PacketInputStreamIOExceptionpublic void setServerThreadId(long serverThreadId,
Boolean isMaster)
setServerThreadId 在接口中 PacketInputStreamserverThreadId - current server thread id.isMaster - is server masterpublic void setTraceCache(LruTraceCache traceCache)
setTraceCache 在接口中 PacketInputStreampublic void enableNetworkStatistics(boolean flag)
enableNetworkStatistics 在接口中 PacketInputStreampublic long getTimestampAfterRead()
getTimestampAfterRead 在接口中 PacketInputStreampublic void clearNetworkStatistics()
clearNetworkStatistics 在接口中 PacketInputStreampublic void startReceiveResponse()
startReceiveResponse 在接口中 PacketInputStreampublic void endReceiveResponse(String sql)
endReceiveResponse 在接口中 PacketInputStreamCopyright © 2024 oceanbase.com. All rights reserved.