Class ScatterGatherMode

  • Direct Known Subclasses:
    VeniceDelegateMode

    public abstract class ScatterGatherMode
    extends java.lang.Object
    Created by acurtis on 6/20/17.
    • Field Detail

      • BROADCAST_BY_PARTITION

        public static final ScatterGatherMode BROADCAST_BY_PARTITION
        Sends request to every partition.
      • BROADCAST_BY_PRIMARY_HOST

        public static final ScatterGatherMode BROADCAST_BY_PRIMARY_HOST
        Sends request to the first host found for every partition, grouped by host.
      • GROUP_BY_PARTITION

        public static final ScatterGatherMode GROUP_BY_PARTITION
        One request per partition.
      • GROUP_BY_PRIMARY_HOST

        public static final ScatterGatherMode GROUP_BY_PRIMARY_HOST
        Sends request for first host for each partition in request, grouped by host
      • GROUP_BY_GREEDY_HOST

        public static final ScatterGatherMode GROUP_BY_GREEDY_HOST
        Sends request for minimal group of hosts. When multiple hosts can serve the same partition, try to use maximal munch to select the smallest number of hosts to handle the partitions.
    • Constructor Detail

      • ScatterGatherMode

        protected ScatterGatherMode​(@Nonnull
                                    java.lang.String name,
                                    boolean broadcast)
    • Method Detail

      • scatter

        @Deprecated
        @Nonnull
        public <H,​P extends ResourcePath<K>,​K,​R> Scatter<H,​P,​K> scatter​(@Nonnull
                                                                                                      Scatter<H,​P,​K> scatter,
                                                                                                      @Nonnull
                                                                                                      java.lang.String requestMethod,
                                                                                                      @Nonnull
                                                                                                      java.lang.String resourceName,
                                                                                                      @Nonnull
                                                                                                      PartitionFinder<K> partitionFinder,
                                                                                                      @Nonnull
                                                                                                      HostFinder<H,​R> hostFinder,
                                                                                                      @Nonnull
                                                                                                      HostHealthMonitor<H> hostHealthMonitor,
                                                                                                      @Nonnull
                                                                                                      R roles)
                                                                                               throws RouterException
        Deprecated.
        Deprecated method is compatible to old method signature.
        Throws:
        RouterException
      • scatter

        @Nonnull
        public <H,​P extends ResourcePath<K>,​K,​R> java.util.concurrent.CompletionStage<Scatter<H,​P,​K>> scatter​(@Nonnull
                                                                                                                                            Scatter<H,​P,​K> scatter,
                                                                                                                                            @Nonnull
                                                                                                                                            java.lang.String requestMethod,
                                                                                                                                            @Nonnull
                                                                                                                                            java.lang.String resourceName,
                                                                                                                                            @Nonnull
                                                                                                                                            AsyncPartitionFinder<K> partitionFinder,
                                                                                                                                            @Nonnull
                                                                                                                                            HostFinder<H,​R> hostFinder,
                                                                                                                                            @Nonnull
                                                                                                                                            HostHealthMonitor<H> hostHealthMonitor,
                                                                                                                                            @Nonnull
                                                                                                                                            R roles)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object