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.Object
Routing 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 boolean
equals(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.int
hashCode()
void
removeHost(H host)
java.lang.String
toString()
-
-
-
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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-