public class PacketReader extends Object
| Constructor and Description |
|---|
PacketReader(InputStream in,
Configuration conf,
com.singlestore.jdbc.util.MutableInt sequence)
Constructor of standard socket MySQL packet stream reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.singlestore.jdbc.util.MutableInt |
getSequence() |
com.singlestore.jdbc.client.ReadableByteBuf |
readPacket(boolean reUsable)
Get next MySQL packet.
|
com.singlestore.jdbc.client.ReadableByteBuf |
readPacket(boolean reUsable,
boolean traceEnable)
Get next MySQL packet.
|
void |
setServerThreadId(Long serverThreadId,
HostAddress hostAddress)
Set server thread id.
|
public PacketReader(InputStream in, Configuration conf, com.singlestore.jdbc.util.MutableInt sequence)
in - streamconf - connection optionssequence - current increment sequencepublic com.singlestore.jdbc.client.ReadableByteBuf readPacket(boolean reUsable)
throws IOException
reUsable - if can use existing reusable buf to avoid creating arrayIOException - if socket exception occur.public com.singlestore.jdbc.client.ReadableByteBuf readPacket(boolean reUsable,
boolean traceEnable)
throws IOException
reUsable - if can use existing reusable buf to avoid creating arraytraceEnable - must trace packet.IOException - if socket exception occur.public com.singlestore.jdbc.util.MutableInt getSequence()
public void close()
throws IOException
IOExceptionpublic void setServerThreadId(Long serverThreadId, HostAddress hostAddress)
serverThreadId - current server thread id.hostAddress - host informationCopyright © 2023 SingleStore. All rights reserved.