Example usage for com.google.common.util.concurrent ListenableFuture interface-usage

List of usage examples for com.google.common.util.concurrent ListenableFuture interface-usage

Introduction

In this page you can find the example usage for com.google.common.util.concurrent ListenableFuture interface-usage.

Usage

From source file org.wisdom.api.concurrent.ManagedFutureTask.java

/**
 * An interface representing the 'submitted' task. This class extends {@link com.google.common.util.concurrent.ListenableFuture} to observe the completion of the task and also provides management methods such as {@link #isTaskHang()}.
 * <p>
 * To ease the usage of callbacks, it offers:
 * {@link #onSuccess(org.wisdom.api.concurrent.ManagedFutureTask.SuccessCallback)} and {@link #onFailure(org.wisdom.api.concurrent.ManagedFutureTask.FailureCallback)}.
 * <p>

From source file com.infinities.skyport.async.AsyncResult.java

public class AsyncResult<E> implements ListenableFuture<E> {

    private ListenableFuture<E> inner;

    public AsyncResult(ListenableFuture<E> inner) {
        this.inner = inner;

From source file org.grouplens.lenskit.eval.EvalTask.java

/**
 * An evaluation task.
 *
 * @since 1.3
 * @author <a href="http://www.grouplens.org">GroupLens Research</a>
 */

From source file com.linkedin.pinot.transport.common.ServerResponseFuture.java

/**
 *
 * This provides a composite listenable future interface with each response
 * and errors keyed by an id.
 *
 * For example, in the case of future which holds scatter requests, this will

From source file org.apache.gobblin.runtime.api.JobExecutionDriver.java

/**
 * Defines an implementation which knows how to run a GobblinJob and keep track of the progress.
 *
 * <p> The class utilizes the {@link Service} interface.
 * <ul>
 *  <li> {@link Service#startAsync()} starts the execution.

From source file org.robotninjas.concurrent.FluentFuture.java

public interface FluentFuture<V> extends ListenableFuture<V> {

    <Y> FluentFuture<Y> transform(Function<V, Y> func);

    <Y> FluentFuture<Y> transform(Executor executor, Function<V, Y> func);

From source file brooklyn.util.task.ListenableForwardingFuture.java

/** Wraps a Future, making it a ListenableForwardingFuture, but with the caller having the resposibility to:
 * <li> invoke the listeners on job completion (success or error)
 * <li> invoke the listeners on cancel */
public abstract class ListenableForwardingFuture<T> extends SimpleForwardingFuture<T>
        implements ListenableFuture<T> {

From source file org.opendaylight.yangtools.util.concurrent.AsyncNotifyingListenableFutureTask.java

/**
 * A {@link FutureTask} that also implements the {@link ListenableFuture} interface similar to
 * guava's {@link ListenableFutureTask}. This class differs from ListenableFutureTask in that it
 * allows an {@link Executor} to be specified on construction that is used to execute listener
 * callback Runnables, registered via {@link #addListener}, asynchronously when this task completes.
 * This is useful when you want to guarantee listener executions are off-loaded onto another thread

From source file org.onos.yangtools.util.concurrent.AsyncNotifyingListenableFutureTask.java

/**
 * A {@link FutureTask} that also implements the {@link ListenableFuture} interface similar to
 * guava's {@link ListenableFutureTask}. This class differs from ListenableFutureTask in that it
 * allows an {@link Executor} to be specified on construction that is used to execute listener
 * callback Runnables, registered via {@link #addListener}, asynchronously when this task completes.
 * This is useful when you want to guarantee listener executions are off-loaded onto another thread

From source file com.sk89q.worldguard.util.task.Task.java

/**
 * A task is a job that can be scheduled, run, or cancelled. Tasks can report
 * on their own status. Tasks have owners.
 */
public interface Task<V> extends ListenableFuture<V>, ProgressObservable {