Package org.apache.bookkeeper.meta
Interface MetadataBookieDriver
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
NullMetadataBookieDriver
,ZKMetadataBookieDriver
public interface MetadataBookieDriver extends java.lang.AutoCloseable
Driver 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 void
close()
RegistrationManager
createRegistrationManager()
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.LayoutManager
getLayoutManager()
Return the layout manager.LedgerManagerFactory
getLedgerManagerFactory()
Return the ledger manager factory used for accessing ledger metadata.java.lang.String
getScheme()
Get the scheme of the metadata driver.MetadataBookieDriver
initialize(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:
close
in interfacejava.lang.AutoCloseable
-
-