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) AbstractConfiguration
conf
static int
CUR_VERSION
static java.lang.String
NAME
-
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 void
close()
Uninitialize the factory.int
getCurrentVersion()
Return current factory version.LedgerManagerFactory
initialize(AbstractConfiguration conf, LayoutManager lm, int factoryVersion)
Initialize a factory.LedgerAuditorManager
newLedgerAuditorManager()
Return a ledger auditor manager, which is used to coordinate the auto-recovery process.LedgerIdGenerator
newLedgerIdGenerator()
Return the ledger id generator, which is used for global unique ledger id generation.LedgerManager
newLedgerManager()
return ledger manager for client-side to manage ledger metadata.LedgerUnderreplicationManager
newLedgerUnderreplicationManager()
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:LedgerManagerFactory
Return 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:LedgerManagerFactory
Initialize 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.IOException
Description copied from interface:LedgerManagerFactory
Uninitialize the factory.- Throws:
java.io.IOException
- when fail to uninitialize the factory.
-
newLedgerIdGenerator
public LedgerIdGenerator newLedgerIdGenerator()
Description copied from interface:LedgerManagerFactory
Return 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:LedgerManagerFactory
Return 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:LedgerManagerFactory
return 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:LedgerManagerFactory
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.- Returns:
- ledger underreplication manager
- Throws:
ReplicationException.UnavailableException
java.lang.InterruptedException
ReplicationException.CompatibilityException
- See Also:
LedgerUnderreplicationManager
-
-