Class RequestReplyFuture<K,V,R>
- java.lang.Object
-
- org.springframework.util.concurrent.SettableListenableFuture<org.apache.kafka.clients.consumer.ConsumerRecord<K,R>>
-
- org.springframework.kafka.requestreply.RequestReplyFuture<K,V,R>
-
- Type Parameters:
K
- the key type.V
- the outbound data type.R
- the reply data type.
- All Implemented Interfaces:
java.util.concurrent.Future<org.apache.kafka.clients.consumer.ConsumerRecord<K,R>>
,org.springframework.util.concurrent.ListenableFuture<org.apache.kafka.clients.consumer.ConsumerRecord<K,R>>
public class RequestReplyFuture<K,V,R> extends org.springframework.util.concurrent.SettableListenableFuture<org.apache.kafka.clients.consumer.ConsumerRecord<K,R>>
A listenable future for requests/replies.- Since:
- 2.1.3
- Author:
- Gary Russell
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RequestReplyFuture.Completable
ACompletableFuture
version.
-
Constructor Summary
Constructors Constructor Description RequestReplyFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestReplyFuture.Completable
asCompletable()
Return aCompletableFuture
representation of this instance.org.springframework.util.concurrent.ListenableFuture<SendResult<K,V>>
getSendFuture()
Return the send future.protected void
setSendFuture(org.springframework.util.concurrent.ListenableFuture<SendResult<K,V>> sendFuture)
-
-
-
Method Detail
-
setSendFuture
protected void setSendFuture(org.springframework.util.concurrent.ListenableFuture<SendResult<K,V>> sendFuture)
-
getSendFuture
public org.springframework.util.concurrent.ListenableFuture<SendResult<K,V>> getSendFuture()
Return the send future.- Returns:
- the send future.
-
asCompletable
public RequestReplyFuture.Completable asCompletable()
Return aCompletableFuture
representation of this instance.- Returns:
- the
CompletableFuture
. - Since:
- 2.9
-
-