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.ObjectCreated by acurtis on 6/20/17.
-
-
Field Summary
Fields Modifier and Type Field Description static ScatterGatherModeBROADCAST_BY_PARTITIONSends request to every partition.static ScatterGatherModeBROADCAST_BY_PRIMARY_HOSTSends request to the first host found for every partition, grouped by host.static ScatterGatherModeGROUP_BY_GREEDY_HOSTSends request for minimal group of hosts.static ScatterGatherModeGROUP_BY_PARTITIONOne request per partition.static ScatterGatherModeGROUP_BY_PRIMARY_HOSTSends request for first host for each partition in request, grouped by host
-
Constructor Summary
Constructors Modifier Constructor Description protectedScatterGatherMode(java.lang.String name, boolean broadcast)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ScatterGatherModeasBroadcast()ScatterGatherModeasScatter()booleanequals(java.lang.Object o)inthashCode()<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.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-