public class SpinningSocketReader extends AbstractHandler implements SocketReader
connection, logger, socketChannel
Constructor and Description |
---|
SpinningSocketReader(SocketConnection connection,
ILogger logger,
IOOutOfMemoryHandler oomeHandler,
SocketReaderInitializer initializer) |
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() |
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. |
void |
read() |
getSocketChannel, onFailure
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSocketChannel
public SpinningSocketReader(SocketConnection connection, ILogger logger, IOOutOfMemoryHandler oomeHandler, SocketReaderInitializer initializer)
public ByteBuffer getProtocolBuffer()
getProtocolBuffer
in interface SocketReader
public void initInputBuffer(ByteBuffer inputBuffer)
initInputBuffer
in interface SocketReader
public void initReadHandler(ReadHandler readHandler)
initReadHandler
in interface SocketReader
public long lastReadTimeMillis()
SocketReader
Clock.currentTimeMillis()
a read of the socket was done.lastReadTimeMillis
in interface SocketReader
public SwCounter getNormalFramesReadCounter()
SocketReader
getNormalFramesReadCounter
in interface SocketReader
public SwCounter getPriorityFramesReadCounter()
SocketReader
getPriorityFramesReadCounter
in interface SocketReader
public void init()
SocketReader
init
in interface SocketReader
public void close()
SocketReader
Connection.close(String, Throwable)
method.close
in interface SocketReader
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.