Package org.apache.bookkeeper.client
Interface ITopologyAwareEnsemblePlacementPolicy.Ensemble<T extends Node>
-
- All Known Implementing Classes:
TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints
,TopologyAwareEnsemblePlacementPolicy.RRTopologyAwareCoverageEnsemble
- Enclosing interface:
- ITopologyAwareEnsemblePlacementPolicy<T extends Node>
public static interface ITopologyAwareEnsemblePlacementPolicy.Ensemble<T extends Node>
Ensemble used to hold the result of an ensemble selected for placement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addNode(T node)
Append the new bookie node to the ensemble only if the ensemble doesnt already contain the same bookie.java.util.List<BookieId>
toList()
boolean
validate()
Validates if an ensemble is valid.
-
-
-
Method Detail
-
addNode
boolean addNode(T node)
Append the new bookie node to the ensemble only if the ensemble doesnt already contain the same bookie.- Parameters:
node
- new candidate bookie node.- Returns:
- true if the node was added
-
toList
java.util.List<BookieId> toList()
- Returns:
- list of addresses representing the ensemble
-
validate
boolean validate()
Validates if an ensemble is valid.- Returns:
- true if the ensemble is valid; false otherwise
-
-