diff options
Diffstat (limited to 'core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java')
-rw-r--r-- | core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java index f2d40b38a4..8429493b0e 100644 --- a/core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java +++ b/core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java @@ -46,83 +46,6 @@ import static java.util.Collections.unmodifiableSet; */ public class RoutingAllocation { - /** - * this class is used to describe results of a {@link RoutingAllocation} - */ - public static class Result { - - private final boolean changed; - - private final RoutingTable routingTable; - - private final MetaData metaData; - - private final RoutingExplanations explanations; - - /** - * Creates a new {@link RoutingAllocation.Result} where no change to the routing table was made. - * @param clusterState the unchanged {@link ClusterState} - */ - public static Result unchanged(ClusterState clusterState) { - return new Result(false, clusterState.routingTable(), clusterState.metaData(), new RoutingExplanations()); - } - - /** - * Creates a new {@link RoutingAllocation.Result} where changes were made to the routing table. - * @param routingTable the {@link RoutingTable} this Result references - * @param metaData the {@link MetaData} this Result references - * @param explanations Explanation for the reroute actions - */ - public static Result changed(RoutingTable routingTable, MetaData metaData, RoutingExplanations explanations) { - return new Result(true, routingTable, metaData, explanations); - } - - /** - * Creates a new {@link RoutingAllocation.Result} - * @param changed a flag to determine whether the actual {@link RoutingTable} has been changed - * @param routingTable the {@link RoutingTable} this Result references - * @param metaData the {@link MetaData} this Result references - * @param explanations Explanation for the reroute actions - */ - private Result(boolean changed, RoutingTable routingTable, MetaData metaData, RoutingExplanations explanations) { - this.changed = changed; - this.routingTable = routingTable; - this.metaData = metaData; - this.explanations = explanations; - } - - /** determine whether the actual {@link RoutingTable} has been changed - * @return <code>true</code> if the {@link RoutingTable} has been changed by allocation. Otherwise <code>false</code> - */ - public boolean changed() { - return this.changed; - } - - /** - * Get the {@link MetaData} referenced by this result - * @return referenced {@link MetaData} - */ - public MetaData metaData() { - return metaData; - } - - /** - * Get the {@link RoutingTable} referenced by this result - * @return referenced {@link RoutingTable} - */ - public RoutingTable routingTable() { - return routingTable; - } - - /** - * Get the explanation of this result - * @return explanation - */ - public RoutingExplanations explanations() { - return explanations; - } - } - private final AllocationDeciders deciders; private final RoutingNodes routingNodes; |