Package com.linkedin.alpini.router.api
Class ScatterGatherMode
- java.lang.Object
-
- com.linkedin.alpini.router.api.ScatterGatherMode
-
- Direct Known Subclasses:
VeniceDelegateMode
public abstract class ScatterGatherMode extends java.lang.Object
Created by acurtis on 6/20/17.
-
-
Field Summary
Fields Modifier and Type Field Description static ScatterGatherMode
BROADCAST_BY_PARTITION
Sends request to every partition.static ScatterGatherMode
BROADCAST_BY_PRIMARY_HOST
Sends request to the first host found for every partition, grouped by host.static ScatterGatherMode
GROUP_BY_GREEDY_HOST
Sends request for minimal group of hosts.static ScatterGatherMode
GROUP_BY_PARTITION
One request per partition.static ScatterGatherMode
GROUP_BY_PRIMARY_HOST
Sends request for first host for each partition in request, grouped by host
-
Constructor Summary
Constructors Modifier Constructor Description protected
ScatterGatherMode(java.lang.String name, boolean broadcast)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ScatterGatherMode
asBroadcast()
ScatterGatherMode
asScatter()
boolean
equals(java.lang.Object o)
int
hashCode()
<H,P extends ResourcePath<K>,K,R>
java.util.concurrent.CompletionStage<Scatter<H,P,K>>scatter(Scatter<H,P,K> scatter, java.lang.String requestMethod, java.lang.String resourceName, AsyncPartitionFinder<K> partitionFinder, HostFinder<H,R> hostFinder, HostHealthMonitor<H> hostHealthMonitor, R roles)
<H,P extends ResourcePath<K>,K,R>
Scatter<H,P,K>scatter(Scatter<H,P,K> scatter, java.lang.String requestMethod, java.lang.String resourceName, PartitionFinder<K> partitionFinder, HostFinder<H,R> hostFinder, HostHealthMonitor<H> hostHealthMonitor, R roles)
Deprecated.java.lang.String
toString()
-
-
-
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.
-
-
Method Detail
-
asBroadcast
@Nonnull public final ScatterGatherMode asBroadcast()
-
asScatter
@Nonnull public final ScatterGatherMode asScatter()
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-