Class BookKeeperBuilderImpl
java.lang.Object
org.apache.bookkeeper.client.impl.BookKeeperBuilderImpl
- All Implemented Interfaces:
BookKeeperBuilder
Internal builder for
BookKeeper client.- Since:
- 4.6
-
Constructor Summary
Constructors -
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 requeestTimer) Configure the bookkeeper client to use a provided Netty HashedWheelTimer.statsLogger(StatsLogger statsLogger) Configure the bookkeeper client with a providedStatsLogger.
-
Constructor Details
-
BookKeeperBuilderImpl
-
-
Method Details
-
eventLoopGroup
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client with a provided Netty EventLoopGroup.- Specified by:
eventLoopGroupin interfaceBookKeeperBuilder- Parameters:
eventLoopGroup- an externalEventLoopGroupto use by the bookkeeper client.- Returns:
- client builder.
-
allocator
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client with a providedByteBufAllocator.- Specified by:
allocatorin interfaceBookKeeperBuilder- Parameters:
allocator- an externalByteBufAllocatorto use by the bookkeeper client.- Returns:
- client builder.
-
statsLogger
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client with a providedStatsLogger.- Specified by:
statsLoggerin interfaceBookKeeperBuilder- Parameters:
statsLogger- anStatsLoggerto use by the bookkeeper client to collect stats generated by the client.- Returns:
- client builder.
-
dnsResolver
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client to use the provided dns resolverDNSToSwitchMapping.- Specified by:
dnsResolverin interfaceBookKeeperBuilder- Parameters:
dnsResolver- dns resolver for placement policy to use for resolving network locations.- Returns:
- client builder
-
requestTimer
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client to use a provided Netty HashedWheelTimer.- Specified by:
requestTimerin interfaceBookKeeperBuilder- Parameters:
requeestTimer- request timer for client to manage timer related tasks.- Returns:
- client builder
-
featureProvider
Description copied from interface:BookKeeperBuilderConfigure the bookkeeper client to use a providedFeatureProvider.- Specified by:
featureProviderin interfaceBookKeeperBuilder- Parameters:
featureProvider- the feature provider- Returns:
- client builder
-
build
Description copied from interface:BookKeeperBuilderStart and initialize a new BookKeeper client.- Specified by:
buildin interfaceBookKeeperBuilder- Returns:
- the client
- Throws:
InterruptedExceptionBKExceptionIOException
-