- java.lang.Object
-
- org.redkale.net.AsyncGroup
-
- 直接已知子类:
AsyncIOGroup
public abstract class AsyncGroup extends Object
Client模式的AsyncConnection连接构造器详情见: https://redkale.org
- 从以下版本开始:
- 2.3.0
- 作者:
- zhangjx
-
-
构造器概要
构造器 构造器 说明 AsyncGroup()
-
方法概要
-
-
-
方法详细资料
-
create
public static AsyncGroup create(String threadNameFormat, ExecutorService workExecutor, int bufferCapacity, int bufferPoolSize)
-
create
public static AsyncGroup create(String threadNameFormat, ExecutorService workExecutor, ByteBufferPool safeBufferPool)
-
createTCPClientConnection
public CompletableFuture<AsyncConnection> createTCPClientConnection(SocketAddress address)
-
createTCPClientConnection
public CompletableFuture<AsyncConnection> createTCPClientConnection(int ioIndex, SocketAddress address)
-
createTCPClientConnection
public CompletableFuture<AsyncConnection> createTCPClientConnection(SocketAddress address, int connectTimeoutSeconds)
-
createTCPClientConnection
public abstract CompletableFuture<AsyncConnection> createTCPClientConnection(int ioIndex, SocketAddress address, int connectTimeoutSeconds)
创建TCP连接- 参数:
ioIndex
- IO线程的下坐标address
- 地址connectTimeoutSeconds
- 连接超时- 返回:
- AsyncConnection
- 另请参阅:
AsyncIOGroup.createTCPClientConnection(int, java.net.SocketAddress, int)
-
createUDPClientConnection
public abstract CompletableFuture<AsyncConnection> createUDPClientConnection(int ioIndex, SocketAddress address, int connectTimeoutSeconds)
创建UDP连接- 参数:
ioIndex
- IO线程的下坐标address
- 地址connectTimeoutSeconds
- 连接超时- 返回:
- AsyncConnection
- 另请参阅:
AsyncIOGroup.createUDPClientConnection(int, java.net.SocketAddress, int)
-
createUDPClientConnection
public CompletableFuture<AsyncConnection> createUDPClientConnection(SocketAddress address)
-
createUDPClientConnection
public CompletableFuture<AsyncConnection> createUDPClientConnection(int ioIndex, SocketAddress address)
-
createUDPClientConnection
public CompletableFuture<AsyncConnection> createUDPClientConnection(SocketAddress address, int connectTimeoutSeconds)
-
createClientConnection
public CompletableFuture<AsyncConnection> createClientConnection(boolean tcp, int ioIndex, SocketAddress address)
-
createClientConnection
public CompletableFuture<AsyncConnection> createClientConnection(boolean tcp, int ioIndex, SocketAddress address, int connectTimeoutSeconds)
-
scheduleTimeout
public abstract ScheduledFuture scheduleTimeout(Runnable callable, long delay, TimeUnit unit)
设置超时回调- 参数:
callable
- 回调函数delay
- 延迟时长unit
- 时长单位- 返回:
- ScheduledFuture
- 另请参阅:
AsyncIOGroup.scheduleTimeout(java.lang.Runnable, long, java.util.concurrent.TimeUnit)
-
start
public abstract AsyncGroup start()
启动- 返回:
- AsyncGroup
- 另请参阅:
AsyncIOGroup.start()
-
close
public abstract AsyncGroup close()
关闭- 返回:
- AsyncGroup
- 另请参阅:
AsyncIOGroup.close()
-
-