Package org.apache.bookkeeper.meta
Interface MetadataBookieDriver
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
NullMetadataBookieDriver,ZKMetadataBookieDriver
public interface MetadataBookieDriver extends java.lang.AutoCloseableDriver to manage all the metadata managers required by a bookie server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()RegistrationManagercreateRegistrationManager()Create the registration manager used for registering/unregistering bookies.default java.util.concurrent.CompletableFuture<java.lang.Void>disableHealthCheck()Disable health check.default java.util.concurrent.CompletableFuture<java.lang.Void>enableHealthCheck()Enable health check.LayoutManagergetLayoutManager()Return the layout manager.LedgerManagerFactorygetLedgerManagerFactory()Return the ledger manager factory used for accessing ledger metadata.java.lang.StringgetScheme()Get the scheme of the metadata driver.MetadataBookieDriverinitialize(ServerConfiguration conf, StatsLogger statsLogger)Initialize the metadata driver.default java.util.concurrent.CompletableFuture<java.lang.Boolean>isHealthCheckEnabled()Return health check is enable or disable.
-
-
-
Method Detail
-
initialize
MetadataBookieDriver initialize(ServerConfiguration conf, StatsLogger statsLogger) throws MetadataException
Initialize the metadata driver.- Parameters:
conf- configurationstatsLogger- stats logger- Returns:
- metadata driver
- Throws:
MetadataException
-
getScheme
java.lang.String getScheme()
Get the scheme of the metadata driver.- Returns:
- the scheme of the metadata driver.
-
createRegistrationManager
RegistrationManager createRegistrationManager()
Create the registration manager used for registering/unregistering bookies.- Returns:
- the registration manager used for registering/unregistering bookies.
-
getLedgerManagerFactory
LedgerManagerFactory getLedgerManagerFactory() throws MetadataException
Return the ledger manager factory used for accessing ledger metadata.- Returns:
- the ledger manager factory used for accessing ledger metadata.
- Throws:
MetadataException
-
getLayoutManager
LayoutManager getLayoutManager()
Return the layout manager.- Returns:
- the layout manager.
-
isHealthCheckEnabled
default java.util.concurrent.CompletableFuture<java.lang.Boolean> isHealthCheckEnabled()
Return health check is enable or disable.- Returns:
- true if health check is enable, otherwise false.
-
disableHealthCheck
default java.util.concurrent.CompletableFuture<java.lang.Void> disableHealthCheck()
Disable health check.
-
enableHealthCheck
default java.util.concurrent.CompletableFuture<java.lang.Void> enableHealthCheck()
Enable health check.
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-