Package org.jgroups.blocks.cs
Class NioConnection.Reader
- java.lang.Object
-
- org.jgroups.blocks.cs.NioConnection.Reader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Runnable
- Enclosing class:
- NioConnection
protected class NioConnection.Reader extends java.lang.Object implements java.lang.Runnable, java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandata_availableprotected CondVardata_available_condprotected java.util.concurrent.locks.Locklockprotected booleanrunningprotected NioConnection.Statestateprotected java.lang.Threadthread
-
Constructor Summary
Constructors Modifier Constructor Description protectedReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_run()protected voidclear(int op)voidclose()booleanisRunning()voidreceive()Called by the selector when data is ready to be read from the SocketChannelprotected voidregister(int op)voidrun()protected voidstart()protected voidstate(NioConnection.State st)protected voidstop()
-
-
-
Field Detail
-
lock
protected final java.util.concurrent.locks.Lock lock
-
state
protected NioConnection.State state
-
data_available
protected volatile boolean data_available
-
data_available_cond
protected final CondVar data_available_cond
-
thread
protected volatile java.lang.Thread thread
-
running
protected volatile boolean running
-
-
Method Detail
-
start
protected void start()
-
stop
protected void stop()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
isRunning
public boolean isRunning()
-
receive
public void receive()
Called by the selector when data is ready to be read from the SocketChannel
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
_run
protected void _run()
-
register
protected void register(int op)
-
clear
protected void clear(int op)
-
state
protected void state(NioConnection.State st)
-
-