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_LIST
static TopologyAwareEnsemblePlacementPolicy.EnsembleForReplacementWithNoConstraints
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protected
EnsembleForReplacementWithNoConstraints()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addNode(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()
boolean
validate()
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.Ensemble
Append the new bookie node to the ensemble only if the ensemble doesnt already contain the same bookie.- Specified by:
addNode
in 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:
toList
in interfaceITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>
- Returns:
- list of addresses representing the ensemble
-
validate
public boolean validate()
Validates if an ensemble is valid.- Specified by:
validate
in interfaceITopologyAwareEnsemblePlacementPolicy.Ensemble<BookieNode>
- Returns:
- true if the ensemble is valid; false otherwise
-
-