public interface SocketReader
ByteBuffer
. Once the data is read into the ByteBuffer, this ByteBuffer is passed to the ReadHandler
that takes care of the actual processing of the incoming data.
Each SocketConnection
has its own SocketReader
instance.
There are many different flavors of SocketReader:
IOThreadingModel.newSocketReader(SocketConnection)
.
Before Hazelcast 3.6 the name of this interface was ReadHandler.ReadHandler
,
SocketWriter
,
IOThreadingModel
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this SocketReader.
|
SwCounter |
getNormalFramesReadCounter()
Gets the SwCounter that counts the number of normal packets that have been read.
|
SwCounter |
getPriorityFramesReadCounter()
Gets the SwCounter that counts the number of priority packets that have been read.
|
ByteBuffer |
getProtocolBuffer() |
SocketChannelWrapper |
getSocketChannel() |
void |
init()
Initializes this SocketReader.
|
void |
initInputBuffer(ByteBuffer inputBuffer) |
void |
initReadHandler(ReadHandler readHandler) |
long |
lastReadTimeMillis()
Returns the last
Clock.currentTimeMillis() a read of the socket was done. |
long lastReadTimeMillis()
Clock.currentTimeMillis()
a read of the socket was done.SwCounter getNormalFramesReadCounter()
SwCounter getPriorityFramesReadCounter()
void init()
void close()
Connection.close(String, Throwable)
method.void initInputBuffer(ByteBuffer inputBuffer)
void initReadHandler(ReadHandler readHandler)
SocketChannelWrapper getSocketChannel()
ByteBuffer getProtocolBuffer()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.