Package org.apache.bookkeeper.meta
Class LegacyHierarchicalLedgerManagerFactory
- java.lang.Object
-
- org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
-
- org.apache.bookkeeper.meta.LegacyHierarchicalLedgerManagerFactory
-
- All Implemented Interfaces:
java.lang.AutoCloseable,LedgerManagerFactory
- Direct Known Subclasses:
HierarchicalLedgerManagerFactory
public class LegacyHierarchicalLedgerManagerFactory extends AbstractZkLedgerManagerFactory
Hierarchical Ledger Manager Factory.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) AbstractConfigurationconfstatic intCUR_VERSIONstatic java.lang.StringNAME-
Fields inherited from class org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
V1, zk
-
-
Constructor Summary
Constructors Constructor Description LegacyHierarchicalLedgerManagerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Uninitialize the factory.intgetCurrentVersion()Return current factory version.LedgerManagerFactoryinitialize(AbstractConfiguration conf, LayoutManager lm, int factoryVersion)Initialize a factory.LedgerAuditorManagernewLedgerAuditorManager()Return a ledger auditor manager, which is used to coordinate the auto-recovery process.LedgerIdGeneratornewLedgerIdGenerator()Return the ledger id generator, which is used for global unique ledger id generation.LedgerManagernewLedgerManager()return ledger manager for client-side to manage ledger metadata.LedgerUnderreplicationManagernewLedgerUnderreplicationManager()Return a ledger underreplication manager, which is used to mark ledgers as unreplicated, and to retrieve a ledger which is underreplicated so that it can be rereplicated.-
Methods inherited from class org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
createNewLMFactory, format, newLedgerManagerFactory, validateAndNukeExistingCluster
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
CUR_VERSION
public static final int CUR_VERSION
- See Also:
- Constant Field Values
-
conf
AbstractConfiguration conf
-
-
Method Detail
-
getCurrentVersion
public int getCurrentVersion()
Description copied from interface:LedgerManagerFactoryReturn current factory version.- Returns:
- current version used by factory.
-
initialize
public LedgerManagerFactory initialize(AbstractConfiguration conf, LayoutManager lm, int factoryVersion) throws java.io.IOException
Description copied from interface:LedgerManagerFactoryInitialize a factory.- Parameters:
conf- Configuration object used to initialize factorylm- Layout manager used for initialize ledger manager factoryfactoryVersion- What version used to initialize factory.- Returns:
- ledger manager factory instance
- Throws:
java.io.IOException- when fail to initialize the factory.
-
close
public void close() throws java.io.IOExceptionDescription copied from interface:LedgerManagerFactoryUninitialize the factory.- Throws:
java.io.IOException- when fail to uninitialize the factory.
-
newLedgerIdGenerator
public LedgerIdGenerator newLedgerIdGenerator()
Description copied from interface:LedgerManagerFactoryReturn the ledger id generator, which is used for global unique ledger id generation.- Returns:
- ledger id generator.
-
newLedgerAuditorManager
public LedgerAuditorManager newLedgerAuditorManager()
Description copied from interface:LedgerManagerFactoryReturn a ledger auditor manager, which is used to coordinate the auto-recovery process.- Returns:
- ledger auditor manager
- See Also:
LedgerAuditorManager
-
newLedgerManager
public LedgerManager newLedgerManager()
Description copied from interface:LedgerManagerFactoryreturn ledger manager for client-side to manage ledger metadata.- Returns:
- ledger manager
- See Also:
LedgerManager
-
newLedgerUnderreplicationManager
public LedgerUnderreplicationManager newLedgerUnderreplicationManager() throws ReplicationException.UnavailableException, java.lang.InterruptedException, ReplicationException.CompatibilityException
Description copied from interface:LedgerManagerFactoryReturn a ledger underreplication manager, which is used to mark ledgers as unreplicated, and to retrieve a ledger which is underreplicated so that it can be rereplicated.- Returns:
- ledger underreplication manager
- Throws:
ReplicationException.UnavailableExceptionjava.lang.InterruptedExceptionReplicationException.CompatibilityException- See Also:
LedgerUnderreplicationManager
-
-