Class DecompressPacketInputStream
- java.lang.Object
-
- org.mariadb.jdbc.internal.io.input.DecompressPacketInputStream
-
- All Implemented Interfaces:
PacketInputStream
public class DecompressPacketInputStream extends Object implements PacketInputStream
-
-
Constructor Summary
Constructors Constructor Description DecompressPacketInputStream(InputStream in, int maxQuerySizeToLog, long threadId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intgetCompressLastPacketSeq()InputStreamgetInputStream()intgetLastPacketSeq()BuffergetPacket(boolean reUsable)byte[]getPacketArray(boolean reUsable)Get next packet.voidsetServerThreadId(long serverThreadId, Boolean isMaster)Set server thread id.voidsetTraceCache(LruTraceCache traceCache)
-
-
-
Constructor Detail
-
DecompressPacketInputStream
public DecompressPacketInputStream(InputStream in, int maxQuerySizeToLog, long threadId)
-
-
Method Detail
-
getPacket
public Buffer getPacket(boolean reUsable) throws IOException
- Specified by:
getPacketin interfacePacketInputStream- Throws:
IOException
-
getPacketArray
public byte[] getPacketArray(boolean reUsable) throws IOExceptionGet next packet. Packet can be compressed, and if so, can contain many standard packet.- Specified by:
getPacketArrayin interfacePacketInputStream- Parameters:
reUsable- if can use existing reusable buffer to avoid creating array- Returns:
- array packet.
- Throws:
IOException- if socket exception occur.
-
getLastPacketSeq
public int getLastPacketSeq()
- Specified by:
getLastPacketSeqin interfacePacketInputStream
-
getCompressLastPacketSeq
public int getCompressLastPacketSeq()
- Specified by:
getCompressLastPacketSeqin interfacePacketInputStream
-
close
public void close() throws IOException- Specified by:
closein interfacePacketInputStream- Throws:
IOException
-
setServerThreadId
public void setServerThreadId(long serverThreadId, Boolean isMaster)Set server thread id.- Specified by:
setServerThreadIdin interfacePacketInputStream- Parameters:
serverThreadId- current server thread id.isMaster- is server master
-
setTraceCache
public void setTraceCache(LruTraceCache traceCache)
- Specified by:
setTraceCachein interfacePacketInputStream
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStreamin interfacePacketInputStream
-
-