public interface EnsemblePlacementPolicy
| Modifier and Type | Method and Description | 
|---|---|
| EnsemblePlacementPolicy | initialize(org.apache.commons.configuration.Configuration conf)Initialize the policy. | 
| ArrayList<org.apache.bookkeeper.net.BookieSocketAddress> | newEnsemble(int ensembleSize,
           int writeQuorumSize,
           Set<org.apache.bookkeeper.net.BookieSocketAddress> excludeBookies)Choose numBookies bookies for ensemble. | 
| Set<org.apache.bookkeeper.net.BookieSocketAddress> | onClusterChanged(Set<org.apache.bookkeeper.net.BookieSocketAddress> writableBookies,
                Set<org.apache.bookkeeper.net.BookieSocketAddress> readOnlyBookies)A consistent view of the cluster (what bookies are available as writable, what bookies are available as
 readonly) is updated when any changes happen in the cluster. | 
| org.apache.bookkeeper.net.BookieSocketAddress | replaceBookie(org.apache.bookkeeper.net.BookieSocketAddress bookieToReplace,
             Set<org.apache.bookkeeper.net.BookieSocketAddress> excludeBookies)Choose a new bookie to replace bookieToReplace. | 
| void | uninitalize()Uninitialize the policy | 
EnsemblePlacementPolicy initialize(org.apache.commons.configuration.Configuration conf)
conf - client configuration.void uninitalize()
Set<org.apache.bookkeeper.net.BookieSocketAddress> onClusterChanged(Set<org.apache.bookkeeper.net.BookieSocketAddress> writableBookies, Set<org.apache.bookkeeper.net.BookieSocketAddress> readOnlyBookies)
writableBookies - All the bookies in the cluster available for write/read.readOnlyBookies - All the bookies in the cluster available for readonly.ArrayList<org.apache.bookkeeper.net.BookieSocketAddress> newEnsemble(int ensembleSize, int writeQuorumSize, Set<org.apache.bookkeeper.net.BookieSocketAddress> excludeBookies) throws BKException.BKNotEnoughBookiesException
BKException.BKNotEnoughBookiesException is thrown.ensembleSize - Ensemble SizewriteQuorumSize - Write Quorum SizeexcludeBookies - Bookies that should not be considered as targets.BKException.BKNotEnoughBookiesException - if not enough bookies available.org.apache.bookkeeper.net.BookieSocketAddress replaceBookie(org.apache.bookkeeper.net.BookieSocketAddress bookieToReplace,
                                                          Set<org.apache.bookkeeper.net.BookieSocketAddress> excludeBookies)
                                                            throws BKException.BKNotEnoughBookiesException
BKException.BKNotEnoughBookiesException is thrown.bookieToReplace - bookie to replaceexcludeBookies - bookies that should not be considered as candidate.BKException.BKNotEnoughBookiesExceptionCopyright © 2011-2016 The Apache Software Foundation. All Rights Reserved.