- java.lang.Object
-
- org.redkale.net.AsyncGroup
-
- org.redkale.net.AsyncIOGroup
-
@ResourceType(AsyncGroup.class) public class AsyncIOGroup extends AsyncGroup
协议处理的IO线程组详情见: https://redkale.org
- 从以下版本开始:
- 2.1.0
- 作者:
- zhangjx
-
-
字段概要
字段 修饰符和类型 字段 说明 protected LongAdder
connClosedCounter
protected LongAdder
connCreateCounter
protected LongAdder
connLivingCounter
protected ScheduledExecutorService
timeoutExecutor
-
构造器概要
构造器 构造器 说明 AsyncIOGroup(int bufferCapacity, int bufferPoolSize)
AsyncIOGroup(String threadNameFormat, ExecutorService workExecutor, int bufferCapacity, int bufferPoolSize)
AsyncIOGroup(String threadNameFormat, ExecutorService workExecutor, ByteBufferPool safeBufferPool)
-
方法概要
-
-
-
字段详细资料
-
connCreateCounter
protected final LongAdder connCreateCounter
-
connLivingCounter
protected final LongAdder connLivingCounter
-
connClosedCounter
protected final LongAdder connClosedCounter
-
timeoutExecutor
protected final ScheduledExecutorService timeoutExecutor
-
-
构造器详细资料
-
AsyncIOGroup
public AsyncIOGroup(int bufferCapacity, int bufferPoolSize)
-
AsyncIOGroup
public AsyncIOGroup(String threadNameFormat, ExecutorService workExecutor, int bufferCapacity, int bufferPoolSize)
-
AsyncIOGroup
public AsyncIOGroup(String threadNameFormat, ExecutorService workExecutor, ByteBufferPool safeBufferPool)
-
-
方法详细资料
-
createConnectIOThread
protected AsyncIOThread createConnectIOThread(ThreadGroup g, String name, int index, int threads, ExecutorService workExecutor, ByteBufferPool safeBufferPool) throws IOException
- 抛出:
IOException
-
createAsyncIOThread
protected AsyncIOThread createAsyncIOThread(ThreadGroup g, String name, int index, int threads, ExecutorService workExecutor, ByteBufferPool safeBufferPool) throws IOException
- 抛出:
IOException
-
start
public AsyncIOGroup start()
从类复制的说明:AsyncGroup
启动- 指定者:
start
在类中AsyncGroup
- 返回:
- AsyncGroup
- 另请参阅:
start()
-
close
public AsyncGroup close()
从类复制的说明:AsyncGroup
关闭- 指定者:
close
在类中AsyncGroup
- 返回:
- AsyncGroup
- 另请参阅:
close()
-
skipClose
public AsyncIOGroup skipClose(boolean skip)
-
dispose
public AsyncIOGroup dispose()
-
getCreateConnectionCount
public LongAdder getCreateConnectionCount()
-
getClosedConnectionCount
public LongAdder getClosedConnectionCount()
-
getLivingConnectionCount
public LongAdder getLivingConnectionCount()
-
nextReadIOThread
public AsyncIOThread nextReadIOThread()
-
nextWriteIOThread
public AsyncIOThread nextWriteIOThread()
-
scheduleTimeout
public ScheduledFuture scheduleTimeout(Runnable callable, long delay, TimeUnit unit)
从类复制的说明:AsyncGroup
设置超时回调- 指定者:
scheduleTimeout
在类中AsyncGroup
- 参数:
callable
- 回调函数delay
- 延迟时长unit
- 时长单位- 返回:
- ScheduledFuture
- 另请参阅:
scheduleTimeout(java.lang.Runnable, long, java.util.concurrent.TimeUnit)
-
newTCPClientConnection
public AsyncConnection newTCPClientConnection()
-
createTCPClientConnection
public CompletableFuture<AsyncConnection> createTCPClientConnection(int ioIndex, SocketAddress address, int connectTimeoutSeconds)
从类复制的说明:AsyncGroup
创建TCP连接- 指定者:
createTCPClientConnection
在类中AsyncGroup
- 参数:
ioIndex
- IO线程的下坐标address
- 地址connectTimeoutSeconds
- 连接超时- 返回:
- AsyncConnection
- 另请参阅:
createTCPClientConnection(int, java.net.SocketAddress, int)
-
newUDPClientConnection
public AsyncConnection newUDPClientConnection()
-
createUDPClientConnection
public CompletableFuture<AsyncConnection> createUDPClientConnection(int ioIndex, SocketAddress address, int connectTimeoutSeconds)
从类复制的说明:AsyncGroup
创建UDP连接- 指定者:
createUDPClientConnection
在类中AsyncGroup
- 参数:
ioIndex
- IO线程的下坐标address
- 地址connectTimeoutSeconds
- 连接超时- 返回:
- AsyncConnection
- 另请参阅:
createUDPClientConnection(int, java.net.SocketAddress, int)
-
-