Java Code Examples for org.apache.flink.runtime.concurrent.FutureUtils#completedVoidFuture()

The following examples show how to use org.apache.flink.runtime.concurrent.FutureUtils#completedVoidFuture() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DispatcherRunnerLeaderElectionLifecycleManager.java    From flink with Apache License 2.0 5 votes vote down vote up
private CompletableFuture<Void> stopServices() {
	try {
		leaderElectionService.stop();
	} catch (Exception e) {
		return FutureUtils.completedExceptionally(e);
	}

	return FutureUtils.completedVoidFuture();
}
 
Example 2
Source File: AbstractDispatcherLeaderProcess.java    From flink with Apache License 2.0 5 votes vote down vote up
private CompletableFuture<Void> closeDispatcherService() {
	if (dispatcherService != null) {
		return dispatcherService.closeAsync();
	} else {
		return FutureUtils.completedVoidFuture();
	}
}
 
Example 3
Source File: CheckpointBarrierUnaligner.java    From flink with Apache License 2.0 5 votes vote down vote up
synchronized CompletableFuture<Void> getAllBarriersReceivedFuture(long checkpointId) {
	if (checkpointId < currentReceivedCheckpointId) {
		return FutureUtils.completedVoidFuture();
	}
	if (checkpointId > currentReceivedCheckpointId) {
		throw new IllegalStateException("Checkpoint " + checkpointId + " has not been started at all");
	}
	return allBarriersReceivedFuture;
}
 
Example 4
Source File: AbstractDispatcherLeaderProcess.java    From flink with Apache License 2.0 4 votes vote down vote up
protected CompletableFuture<Void> onClose() {
	return FutureUtils.completedVoidFuture();
}
 
Example 5
Source File: StreamTask.java    From flink with Apache License 2.0 4 votes vote down vote up
private CompletableFuture<Void> prepareInputSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws IOException {
	if (inputProcessor == null) {
		return FutureUtils.completedVoidFuture();
	}
	return inputProcessor.prepareSnapshot(channelStateWriter, checkpointId);
}
 
Example 6
Source File: StreamTaskTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public CompletableFuture<Void> prepareSnapshot(
		ChannelStateWriter channelStateWriter,
		final long checkpointId) {
	return FutureUtils.completedVoidFuture();
}
 
Example 7
Source File: StreamTaskTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) {
	return FutureUtils.completedVoidFuture();
}