Class LeaderGatewayRetriever<T extends org.apache.flink.runtime.rpc.RpcGateway>
- java.lang.Object
-
- org.apache.flink.runtime.webmonitor.retriever.LeaderRetriever
-
- org.apache.flink.runtime.webmonitor.retriever.LeaderGatewayRetriever<T>
-
- Type Parameters:
T
- type of the gateway to retrieve
- All Implemented Interfaces:
LeaderRetrievalListener
,GatewayRetriever<T>
- Direct Known Subclasses:
RpcGatewayRetriever
public abstract class LeaderGatewayRetriever<T extends org.apache.flink.runtime.rpc.RpcGateway> extends LeaderRetriever implements GatewayRetriever<T>
Retrieves and stores the leadingRpcGateway
.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.webmonitor.retriever.LeaderRetriever
log
-
-
Constructor Summary
Constructors Constructor Description LeaderGatewayRetriever()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CompletableFuture<T>
createGateway(CompletableFuture<org.apache.flink.api.java.tuple.Tuple2<String,UUID>> leaderFuture)
CompletableFuture<T>
getFuture()
Get future of object to retrieve.void
notifyNewLeaderAddress(CompletableFuture<org.apache.flink.api.java.tuple.Tuple2<String,UUID>> newLeaderAddressFuture)
-
Methods inherited from class org.apache.flink.runtime.webmonitor.retriever.LeaderRetriever
getLeaderFuture, getLeaderNow, handleError, notifyLeaderAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever
getNow
-
-
-
-
Method Detail
-
getFuture
public CompletableFuture<T> getFuture()
Description copied from interface:GatewayRetriever
Get future of object to retrieve.- Specified by:
getFuture
in interfaceGatewayRetriever<T extends org.apache.flink.runtime.rpc.RpcGateway>
- Returns:
- Future object to retrieve
-
notifyNewLeaderAddress
public void notifyNewLeaderAddress(CompletableFuture<org.apache.flink.api.java.tuple.Tuple2<String,UUID>> newLeaderAddressFuture)
- Overrides:
notifyNewLeaderAddress
in classLeaderRetriever
-
createGateway
protected abstract CompletableFuture<T> createGateway(CompletableFuture<org.apache.flink.api.java.tuple.Tuple2<String,UUID>> leaderFuture)
-
-