Interface AggregateResult<T>

    • Method Detail

      • request

        T request()
        Returns the original request object that was submitted to the cluster.
        Returns:
        Original request.
      • nodes

        List<ClusterNode> nodes()
        Returns the aggregation participants. Returns an empty list if there were no suitable nodes in the cluster to perform the operation.
        Returns:
        Cluster nodes that participated in the aggregation or an empty list if there were no suitable nodes in the cluster to perform the operation.
      • errors

        Map<ClusterNode,​Throwable> errors()
        Returns the map of cluster nodes and errors that happened while trying to communicate with those nodes. Returns an empty map if there were no failures.
        Returns:
        Map of nodes and their corresponding failures. Returns an empty map if there were no failures.
        See Also:
        errorOf(ClusterNode)
      • resultsByNode

        Map<ClusterNode,​T> resultsByNode()
        Returns a map of cluster nodes and results that were successfully received from these nodes. Returns an empty map if there were no successful results.
        Returns:
        Map of results.
        See Also:
        resultOf(ClusterNode)
      • resultOf

        default T resultOf​(ClusterNode node)
        Returns the result for the specified cluster node or null if there was no result from this node.
        Parameters:
        node - Cluster node (must be one of the nodes()).
        Returns:
        Result.
        See Also:
        results()
      • stream

        default Stream<T> stream()
        Returns the aggregation results as Stream.
        Returns:
        Stream of aggregation results.
      • results

        default Collection<T> results()
        Returns the aggregation results.
        Returns:
        Aggregation results.
      • isSuccess

        default boolean isSuccess​(ClusterNode node)
        Returns true if there was no failure during the aggregation request processing on the specified cluster node.
        Parameters:
        node - Cluster node (must be one of the nodes()).
        Returns:
        true if there was no communication failure with the specified cluster node.
      • isSuccess

        default boolean isSuccess()
        Returns true if aggregation completed successfully without any errors.
        Returns:
        true if aggregation completed successfully without any errors.
        See Also:
        errors()
      • errorOf

        default Throwable errorOf​(ClusterNode node)
        Returns an error for the specified node or null if there was no failure on that node.
        Parameters:
        node - Cluster node (must be one of the nodes()).
        Returns:
        Error in case of a communication error with the specified node or null.
        See Also:
        errors()