Class DefaultExecutionGraphCache
- java.lang.Object
-
- org.apache.flink.runtime.rest.handler.legacy.DefaultExecutionGraphCache
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ExecutionGraphCache
public class DefaultExecutionGraphCache extends Object implements ExecutionGraphCache
Default implementation ofExecutionGraphCache
.
-
-
Constructor Summary
Constructors Constructor Description DefaultExecutionGraphCache(Duration timeout, Duration timeToLive)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Perform the cleanup of out dated cache entries.void
close()
Closes the execution graph cache.CompletableFuture<ExecutionGraphInfo>
getExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, RestfulGateway restfulGateway)
Gets theExecutionGraphInfo
for the givenJobID
and caches it.int
size()
Gets the number of cache entries.
-
-
-
Method Detail
-
close
public void close()
Description copied from interface:ExecutionGraphCache
Closes the execution graph cache.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceExecutionGraphCache
-
size
public int size()
Description copied from interface:ExecutionGraphCache
Gets the number of cache entries.- Specified by:
size
in interfaceExecutionGraphCache
-
getExecutionGraphInfo
public CompletableFuture<ExecutionGraphInfo> getExecutionGraphInfo(org.apache.flink.api.common.JobID jobId, RestfulGateway restfulGateway)
Description copied from interface:ExecutionGraphCache
Gets theExecutionGraphInfo
for the givenJobID
and caches it. TheExecutionGraphInfo
will be requested again after the refresh interval has passed or if the graph could not be retrieved from the given gateway.- Specified by:
getExecutionGraphInfo
in interfaceExecutionGraphCache
- Parameters:
jobId
- identifying theExecutionGraphInfo
to getrestfulGateway
- to request theExecutionGraphInfo
from- Returns:
- Future containing the requested
ExecutionGraphInfo
-
cleanup
public void cleanup()
Description copied from interface:ExecutionGraphCache
Perform the cleanup of out dated cache entries.- Specified by:
cleanup
in interfaceExecutionGraphCache
-
-