Class ChannelRecord
- java.lang.Object
-
- java.util.concurrent.CompletableFuture<io.netty.channel.Channel>
-
- org.infinispan.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 extendsCompletableFuturewhich 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 booleancloseAndWasIdle()booleancomplete(io.netty.channel.Channel channel)SocketAddressgetUnresolvedAddress()booleanisIdle()static ChannelRecordof(io.netty.channel.Channel channel)voidoperationComplete(io.netty.channel.ChannelFuture future)voidrelease(io.netty.channel.Channel channel)booleansetIdleAndIsClosed()-
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()
-
complete
public boolean complete(io.netty.channel.Channel channel)
- Overrides:
completein classCompletableFuture<io.netty.channel.Channel>
-
operationComplete
public void operationComplete(io.netty.channel.ChannelFuture future) throws Exception- Specified by:
operationCompletein interfaceio.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>- Throws:
Exception
-
isIdle
public boolean isIdle()
-
setIdleAndIsClosed
public boolean setIdleAndIsClosed()
-
closeAndWasIdle
public boolean closeAndWasIdle()
-
release
public void release(io.netty.channel.Channel channel)
-
-