Class ChannelRecord
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<io.netty.channel.Channel>
-
- org.infinispan.client.hotrod.impl.transport.netty.ChannelRecord
-
- All Implemented Interfaces:
io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
,CompletionStage<io.netty.channel.Channel>
,Future<io.netty.channel.Channel>
,EventListener
public class ChannelRecord extends CompletableFuture<io.netty.channel.Channel> implements io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
This class serves multiple purposes: 1) Activation: this extendsCompletableFuture
which is completed once the connection and initial handshake are completed. 2) Storage for unresolved address and pool info.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
complete(io.netty.channel.Channel channel)
org.infinispan.client.hotrod.impl.transport.netty.ChannelPool
getChannelPool()
SocketAddress
getUnresolvedAddress()
boolean
isIdle()
static ChannelRecord
of(io.netty.channel.Channel channel)
void
operationComplete(io.netty.channel.ChannelFuture future)
-
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
-
-
-
Method Detail
-
of
public static ChannelRecord of(io.netty.channel.Channel channel)
-
getUnresolvedAddress
public SocketAddress getUnresolvedAddress()
-
getChannelPool
public org.infinispan.client.hotrod.impl.transport.netty.ChannelPool getChannelPool()
-
complete
public boolean complete(io.netty.channel.Channel channel)
- Overrides:
complete
in classCompletableFuture<io.netty.channel.Channel>
-
operationComplete
public void operationComplete(io.netty.channel.ChannelFuture future) throws Exception
- Specified by:
operationComplete
in interfaceio.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
- Throws:
Exception
-
isIdle
public boolean isIdle()
-
-