Package org.apache.bookkeeper.client.api
Interface BookKeeperBuilder
-
- All Known Implementing Classes:
BookKeeperBuilderImpl
@Public @Unstable public interface BookKeeperBuilder
BookKeeper Client Builder to build client instances.- Since:
- 4.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BookKeeperBuilderallocator(io.netty.buffer.ByteBufAllocator allocator)Configure the bookkeeper client with a providedByteBufAllocator.BookKeeperbuild()Start and initialize a new BookKeeper client.BookKeeperBuilderdnsResolver(DNSToSwitchMapping dnsResolver)Configure the bookkeeper client to use the provided dns resolverDNSToSwitchMapping.BookKeeperBuildereventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)Configure the bookkeeper client with a provided Netty EventLoopGroup.BookKeeperBuilderfeatureProvider(FeatureProvider featureProvider)Configure the bookkeeper client to use a providedFeatureProvider.BookKeeperBuilderrequestTimer(io.netty.util.HashedWheelTimer requestTimer)Configure the bookkeeper client to use a provided Netty HashedWheelTimer.BookKeeperBuilderstatsLogger(StatsLogger statsLogger)Configure the bookkeeper client with a providedStatsLogger.
-
-
-
Method Detail
-
eventLoopGroup
BookKeeperBuilder eventLoopGroup(io.netty.channel.EventLoopGroup eventLoopGroup)
Configure the bookkeeper client with a provided Netty EventLoopGroup.- Parameters:
eventLoopGroup- an externalEventLoopGroupto use by the bookkeeper client.- Returns:
- client builder.
-
allocator
BookKeeperBuilder allocator(io.netty.buffer.ByteBufAllocator allocator)
Configure the bookkeeper client with a providedByteBufAllocator.- Parameters:
allocator- an externalByteBufAllocatorto use by the bookkeeper client.- Returns:
- client builder.
- Since:
- 4.9
-
statsLogger
BookKeeperBuilder statsLogger(StatsLogger 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
BookKeeperBuilder dnsResolver(DNSToSwitchMapping 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
BookKeeperBuilder requestTimer(io.netty.util.HashedWheelTimer 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
BookKeeperBuilder featureProvider(FeatureProvider featureProvider)
Configure the bookkeeper client to use a providedFeatureProvider.- Parameters:
featureProvider- the feature provider- Returns:
- client builder
-
build
BookKeeper build() throws BKException, java.lang.InterruptedException, java.io.IOException
Start and initialize a new BookKeeper client.- Returns:
- the client
- Throws:
BKExceptionjava.lang.InterruptedExceptionjava.io.IOException
-
-