public class SpinningIOThreadingModel extends Object implements IOThreadingModel
IOThreadingModel that uses (busy) spinning on the SocketChannels to see if there is something
 to read or write.
 Currently there are 2 threads spinning:
 | Constructor and Description | 
|---|
| SpinningIOThreadingModel(LoggingService loggingService,
                        HazelcastThreadGroup hazelcastThreadGroup,
                        IOOutOfMemoryHandler oomeHandler,
                        SocketWriterInitializer socketWriterInitializer,
                        SocketReaderInitializer socketReaderInitializer) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | isBlocking()Tells whether or not every I/O operation on SocketChannel should block until it completes. | 
| SocketReader | newSocketReader(SocketConnection connection)Creates a new SocketReader for the given connection. | 
| SocketWriter | newSocketWriter(SocketConnection connection)Creates a new SocketWriter for the given connection. | 
| void | onConnectionAdded(SocketConnection connection)Is called when a connection is added. | 
| void | onConnectionRemoved(SocketConnection connection)Is called when a connection is removed. | 
| void | shutdown()Shuts down the IOThreadingModel. | 
| void | start()Starts the IOThreadingModel. | 
public SpinningIOThreadingModel(LoggingService loggingService, HazelcastThreadGroup hazelcastThreadGroup, IOOutOfMemoryHandler oomeHandler, SocketWriterInitializer socketWriterInitializer, SocketReaderInitializer socketReaderInitializer)
public boolean isBlocking()
IOThreadingModelisBlocking in interface IOThreadingModeljava.nio.channels.SelectableChannel#configureBlocking(boolean)}public SocketWriter newSocketWriter(SocketConnection connection)
IOThreadingModelnewSocketWriter in interface IOThreadingModelconnection - the TcpIpConnection to create the SocketWriter for.public SocketReader newSocketReader(SocketConnection connection)
IOThreadingModelnewSocketReader in interface IOThreadingModelconnection - the TcpIpConnection to create the SocketReader for.public void onConnectionAdded(SocketConnection connection)
IOThreadingModelonConnectionAdded in interface IOThreadingModelconnection - the connection added.public void onConnectionRemoved(SocketConnection connection)
IOThreadingModelonConnectionRemoved in interface IOThreadingModelconnection - the connection removed.public void start()
IOThreadingModelstart in interface IOThreadingModelpublic void shutdown()
IOThreadingModelshutdown in interface IOThreadingModelCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.