Package org.apache.bookkeeper.client.api
Interface BookKeeperBuilder
- All Known Implementing Classes:
BookKeeperBuilderImpl
BookKeeper Client Builder to build client instances.
- Since:
- 4.6
-
Method Summary
Modifier and TypeMethodDescriptionallocator(io.netty.buffer.ByteBufAllocator allocator) Configure the bookkeeper client with a providedByteBufAllocator.build()Start and initialize a new BookKeeper client.dnsResolver(DNSToSwitchMapping dnsResolver) Configure the bookkeeper client to use the provided dns resolverDNSToSwitchMapping.eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup) Configure the bookkeeper client with a provided Netty EventLoopGroup.featureProvider(FeatureProvider featureProvider) Configure the bookkeeper client to use a providedFeatureProvider.requestTimer(io.netty.util.HashedWheelTimer requestTimer) Configure the bookkeeper client to use a provided Netty HashedWheelTimer.statsLogger(StatsLogger statsLogger) Configure the bookkeeper client with a providedStatsLogger.
-
Method Details
-
eventLoopGroup
Configure the bookkeeper client with a provided Netty EventLoopGroup.- Parameters:
eventLoopGroup- an externalEventLoopGroupto use by the bookkeeper client.- Returns:
- client builder.
-
allocator
Configure the bookkeeper client with a providedByteBufAllocator.- Parameters:
allocator- an externalByteBufAllocatorto use by the bookkeeper client.- Returns:
- client builder.
- Since:
- 4.9
-
statsLogger
Configure the bookkeeper client with a providedStatsLogger.- Parameters:
statsLogger- anStatsLoggerto use by the bookkeeper client to collect stats generated by the client.- Returns:
- client builder.
-
dnsResolver
Configure the bookkeeper client to use the provided dns resolverDNSToSwitchMapping.- Parameters:
dnsResolver- dns resolver for placement policy to use for resolving network locations.- Returns:
- client builder
-
requestTimer
Configure the bookkeeper client to use a provided Netty HashedWheelTimer.- Parameters:
requestTimer- request timer for client to manage timer related tasks.- Returns:
- client builder
-
featureProvider
Configure the bookkeeper client to use a providedFeatureProvider.- Parameters:
featureProvider- the feature provider- Returns:
- client builder
-
build
Start and initialize a new BookKeeper client.- Returns:
- the client
- Throws:
BKExceptionInterruptedExceptionIOException
-