Package com.linkedin.alpini.router.api
Class ScatterGatherRequest<H,K>
- java.lang.Object
-
- com.linkedin.alpini.router.api.ScatterGatherRequest<H,K>
-
- Direct Known Subclasses:
BroadcastScatterGatherRequest
public class ScatterGatherRequest<H,K> extends java.lang.ObjectRouting information for part of a request which the router has mapped to a single storage node. The ScatterGatherRequest holds a storage node hostname, plus keys and partitions which have been mapped to that host. A single request to the router may be split into multiple ScatterGatherRequest objects, one for each host involved in servicing the request.
-
-
Constructor Summary
Constructors Constructor Description ScatterGatherRequest(java.util.List<H> host, java.util.Set<K> partitionKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.List<H>getHosts()java.util.Set<K>getPartitionKeys()java.util.Set<java.lang.String>getPartitionNamesToQuery()Only used by broadcast queries.inthashCode()voidremoveHost(H host)java.lang.StringtoString()
-
-
-
Method Detail
-
getHosts
public java.util.List<H> getHosts()
-
removeHost
public void removeHost(@Nonnull H host)
-
getPartitionKeys
public java.util.Set<K> getPartitionKeys()
-
getPartitionNamesToQuery
public java.util.Set<java.lang.String> getPartitionNamesToQuery()
Only used by broadcast queries. SeeBroadcastScatterGatherRequest.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-