Package org.apache.bookkeeper.client
Class TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints
java.lang.Object
org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints
- All Implemented Interfaces:
ITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>
- Enclosing class:
- TopologyAwareEnsemblePlacementPolicy
protected static class TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints
extends Object
implements ITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
INSTANCE
public static final TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints INSTANCE -
EMPTY_LIST
-
-
Constructor Details
-
EnsembleForReplacementWithNoConstraints
protected EnsembleForReplacementWithNoConstraints()
-
-
Method Details
-
addNode
Description copied from interface:ITopologyAwareEnsemblePlacementPolicy.EnsembleAppend the new bookie node to the ensemble only if the ensemble doesnt already contain the same bookie.- Specified by:
addNodein interfaceITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>- Parameters:
node- new candidate bookie node.- Returns:
- true if the node was added
-
toList
- Specified by:
toListin interfaceITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>- Returns:
- list of addresses representing the ensemble
-
validate
public boolean validate()Validates if an ensemble is valid.- Specified by:
validatein interfaceITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>- Returns:
- true if the ensemble is valid; false otherwise
-