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 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 Details

    • ScatterGatherRequest

      public ScatterGatherRequest(List<H> host, Set<K> partitionKeys)
  • Method Details

    • getHosts

      public List<H> getHosts()
    • removeHost

      public void removeHost(@Nonnull H host)
    • getPartitionKeys

      public Set<K> getPartitionKeys()
    • getPartitionNamesToQuery

      public Set<String> getPartitionNamesToQuery()
      Only used by broadcast queries. See BroadcastScatterGatherRequest.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object