Package org.elasticsearch.gateway
Class AsyncShardFetch.FetchResult<T extends BaseNodeResponse>
- java.lang.Object
-
- org.elasticsearch.gateway.AsyncShardFetch.FetchResult<T>
-
- Enclosing class:
- AsyncShardFetch<T extends BaseNodeResponse>
public static class AsyncShardFetch.FetchResult<T extends BaseNodeResponse> extends Object
The result of a fetch operation. Make sure to first checkhasData()before fetching the actual data.
-
-
Constructor Summary
Constructors Constructor Description FetchResult(ShardId shardId, Map<DiscoveryNode,T> data, Set<String> ignoreNodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<DiscoveryNode,T>getData()Returns the actual data, note, make sure to checkhasData()first and only use this when there is an actual data.booleanhasData()Does the result actually contain data? If not, then there are on going fetch operations happening, and it should wait for it.voidprocessAllocation(RoutingAllocation allocation)Process any changes needed to the allocation based on this fetch result.
-
-
-
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 Map<DiscoveryNode,T> getData()
Returns the actual data, note, make sure to checkhasData()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.
-
-