Class AsyncShardFetch.FetchResult<T extends BaseNodeResponse>

    • Constructor Summary

      Constructors 
      Constructor Description
      FetchResult​(ShardId shardId, java.util.Map<DiscoveryNode,​T> data, java.util.Set<java.lang.String> ignoreNodes)  
    • Method Summary

      Modifier and Type Method Description
      java.util.Map<DiscoveryNode,​T> getData()
      Returns the actual data, note, make sure to check hasData() first and only use this when there is an actual data.
      boolean hasData()
      Does the result actually contain data? If not, then there are on going fetch operations happening, and it should wait for it.
      void processAllocation​(RoutingAllocation allocation)
      Process any changes needed to the allocation based on this fetch result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FetchResult

        public FetchResult​(ShardId shardId,
                           java.util.Map<DiscoveryNode,​T> data,
                           java.util.Set<java.lang.String> ignoreNodes)
    • Method Detail

      • hasData

        public boolean hasData()
        Does the result actually contain data? If not, then there are on going fetch operations happening, and it should wait for it.
      • getData

        public java.util.Map<DiscoveryNode,​T> getData()
        Returns the actual data, note, make sure to check hasData() first and only use this when there is an actual data.
      • processAllocation

        public void processAllocation​(RoutingAllocation allocation)
        Process any changes needed to the allocation based on this fetch result.