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 java.lang.Object implements ITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.List<BookieId>EMPTY_LISTstatic TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraintsINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protectedEnsembleForReplacementWithNoConstraints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddNode(BookieNode node)Append the new bookie node to the ensemble only if the ensemble doesnt already contain the same bookie.java.util.List<BookieId>toList()booleanvalidate()Validates if an ensemble is valid.
-
-
-
Field Detail
-
INSTANCE
public static final TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints INSTANCE
-
EMPTY_LIST
static final java.util.List<BookieId> EMPTY_LIST
-
-
Method Detail
-
addNode
public boolean addNode(BookieNode node)
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
public java.util.List<BookieId> 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
-
-