public class StandardPacketInputStream extends AbstractPacketInputStream
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
lastPacketLength |
protected byte[] |
mysqlHeader |
enableNetworkStatistics, inputStream, MAX_PACKET_SIZE, maxQuerySizeToLog, mysqlSeqNo, REUSABLE_BUFFER_LENGTH, reusableArray, serverThreadLog, threadId, timestampAfterRead, timeTrace, traceCache| 构造器和说明 |
|---|
StandardPacketInputStream(InputStream in,
long threadId,
Options options,
TimeTrace timeTrace)
Constructor of standard socket MySQL packet stream reader.
|
StandardPacketInputStream(long threadId,
Options options,
TimeTrace timeTrace) |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
create(byte[] value)
Constructor for single Data (using text format).
|
static byte[] |
create(byte[][] row,
ColumnType[] columnTypes)
Create Buffer with Text protocol values.
|
protected void |
doTrace(int offset,
int length,
byte[] rawBytes) |
int |
getCompressLastPacketSeq() |
InputStream |
getInputStream()
Get current input stream for creating compress input stream, to avoid losing already read bytes
in case of pipelining.
|
Logger |
getLogger() |
Buffer |
getPacket(boolean reUsable) |
byte[] |
getPacketArray(boolean reUsable)
Get next packet.
|
protected void |
readMysqlStream(byte[] rawBytes,
int off,
int remaining) |
clearNetworkStatistics, close, enableNetworkStatistics, endReceiveResponse, getLastPacketSeq, getTimestampAfterRead, setServerThreadId, setTraceCache, startReceiveResponsepublic StandardPacketInputStream(InputStream in, long threadId, Options options, TimeTrace timeTrace)
in - streamoptions - connection optionsthreadId - thread idpublic Buffer getPacket(boolean reUsable) throws IOException
getPacket 在接口中 PacketInputStreamgetPacket 在类中 AbstractPacketInputStreamIOExceptionpublic byte[] getPacketArray(boolean reUsable)
throws IOException
getPacketArray 在接口中 PacketInputStreamgetPacketArray 在类中 AbstractPacketInputStreamreUsable - if can use existing reusable buffer to avoid creating arrayIOException - if socket exception occur.protected void readMysqlStream(byte[] rawBytes,
int off,
int remaining)
throws IOException
readMysqlStream 在类中 AbstractPacketInputStreamIOExceptionprotected void doTrace(int offset,
int length,
byte[] rawBytes)
doTrace 在类中 AbstractPacketInputStreampublic int getCompressLastPacketSeq()
public static byte[] create(byte[] value)
value - valuepublic static byte[] create(byte[][] row,
ColumnType[] columnTypes)
row - row datacolumnTypes - column typespublic InputStream getInputStream()
public Logger getLogger()
Copyright © 2024 oceanbase.com. All rights reserved.