Class Syndicate.Conductor<T>

  • Type Parameters:
    T - the type of the values from the tasks
    Enclosing class:
    Syndicate<T>

    public static final class Syndicate.Conductor<T>
    extends Object
    Represents the actor to process task within the syndicates
    • Method Detail

      • onComplete

        @Contract("_ -> new")
        @NotNull
        public @NotNull Syndicate.Close<T> onComplete​(@NotNull
                                                      @NotNull Consumer<Try<List<Future<T>>>> futuresConsumer)
        Executes the given tasks, passes a list of Futures holding their status and results when all complete to Accepter. Future.isDone is true for each element of the returned list. Note that a completed task could have terminated either normally or by throwing an exception. The results of this method are undefined if the given collection is modified while this operation is in progress.
        Parameters:
        futuresConsumer - the consumer to accept the list of Futures
        Returns:
        the Try list of Futures holding the status of the tasks
      • execute

        @Contract(" -> new")
        @NotNull
        public @NotNull Syndicate.Conductor<T> execute()
        Executes the given tasks, passes a list of Futures holding their status and results.
        Returns:
        the Try list of Futures holding the status of the tasks
      • get

        @Contract(pure=true)
        @NotNull
        public @NotNull Try<List<Future<T>>> get()
        Get the list of Futures hold the results.
        Returns:
        the Try list of Futures holding the status of the tasks
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        @Contract(value="null -> false",
                  pure=true)
        public boolean equals​(Object o)
        Overrides:
        equals in class Object
      • toString

        @Contract(pure=true)
        @NotNull
        public @NotNull String toString()
        Overrides:
        toString in class Object