MCPcopy Index your code
hub / github.com/OpenTSDB/async / Chain

Class Chain

src/Deferred.java:832–851  ·  view source on GitHub ↗

Callback used to chain a deferred with another one.

Source from the content-addressed store, hash-verified

830 * Callback used to chain a deferred with another one.
831 */
832 private static final class Chain<T> implements Callback<T, T> {
833 private final Deferred<T> other;
834
835 /**
836 * Constructor.
837 * @param other The other deferred to chain with.
838 */
839 public Chain(final Deferred<T> other) {
840 this.other = other;
841 }
842
843 public T call(final T arg) {
844 other.callback(arg);
845 return arg;
846 }
847
848 public String toString() {
849 return "chain with Deferred@" + other.hashCode();
850 }
851 };
852
853 /**
854 * Groups multiple {@code Deferred}s together in a single one.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected