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 boolean
data_available
protected CondVar
data_available_cond
protected java.util.concurrent.locks.Lock
lock
protected boolean
running
protected NioConnection.State
state
protected java.lang.Thread
thread
-
Constructor Summary
Constructors Modifier Constructor Description protected
Reader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_run()
protected void
clear(int op)
void
close()
boolean
isRunning()
void
receive()
Called by the selector when data is ready to be read from the SocketChannelprotected void
register(int op)
void
run()
protected void
start()
protected void
state(NioConnection.State st)
protected void
stop()
-
-
-
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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in 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:
run
in 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)
-
-