public class StandardPacketInputStream extends Object implements PacketInputStream
| Constructor and Description |
|---|
StandardPacketInputStream(InputStream in,
Options options)
Constructor of standard socket MySQL packet stream reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static byte[] |
create(byte[] value)
Constructor for single Data (using text format).
|
static byte[] |
create(byte[][] rowDatas,
ColumnType[] columnTypes)
Create Buffer with Text protocol values.
|
int |
getCompressLastPacketSeq() |
InputStream |
getInputStream()
Get current input stream for creating compress input stream, to avoid losing already
read bytes in case of pipelining.
|
int |
getLastPacketSeq() |
Buffer |
getPacket(boolean reUsable) |
byte[] |
getPacketArray(boolean reUsable)
Get next packet.
|
void |
setServerThreadId(long serverThreadId,
Boolean isMaster)
Set server thread id.
|
void |
setTraceCache(LruTraceCache traceCache) |
public StandardPacketInputStream(InputStream in, Options options)
in - streamoptions - connection optionspublic static byte[] create(byte[] value)
value - valuepublic static byte[] create(byte[][] rowDatas,
ColumnType[] columnTypes)
rowDatas - datascolumnTypes - column typespublic Buffer getPacket(boolean reUsable) throws IOException
getPacket in interface PacketInputStreamIOExceptionpublic InputStream getInputStream()
public byte[] getPacketArray(boolean reUsable)
throws IOException
getPacketArray in interface PacketInputStreamreUsable - if can use existing reusable buffer to avoid creating arrayIOException - if socket exception occur.public int getLastPacketSeq()
getLastPacketSeq in interface PacketInputStreampublic int getCompressLastPacketSeq()
getCompressLastPacketSeq in interface PacketInputStreampublic void close()
throws IOException
close in interface PacketInputStreamIOExceptionpublic void setServerThreadId(long serverThreadId,
Boolean isMaster)
setServerThreadId in interface PacketInputStreamserverThreadId - current server thread id.isMaster - is server masterpublic void setTraceCache(LruTraceCache traceCache)
setTraceCache in interface PacketInputStreamCopyright © 2019 mariadb.org. All rights reserved.