Interface BookKeeperBuilder

    • Method Detail

      • eventLoopGroup

        BookKeeperBuilder eventLoopGroup​(io.netty.channel.EventLoopGroup eventLoopGroup)
        Configure the bookkeeper client with a provided Netty EventLoopGroup.
        Parameters:
        eventLoopGroup - an external EventLoopGroup to use by the bookkeeper client.
        Returns:
        client builder.
      • allocator

        BookKeeperBuilder allocator​(io.netty.buffer.ByteBufAllocator allocator)
        Configure the bookkeeper client with a provided ByteBufAllocator.
        Parameters:
        allocator - an external ByteBufAllocator to use by the bookkeeper client.
        Returns:
        client builder.
        Since:
        4.9
      • statsLogger

        BookKeeperBuilder statsLogger​(StatsLogger statsLogger)
        Configure the bookkeeper client with a provided StatsLogger.
        Parameters:
        statsLogger - an StatsLogger to 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 resolver DNSToSwitchMapping.
        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
      • build

        BookKeeper build()
                  throws BKException,
                         java.lang.InterruptedException,
                         java.io.IOException
        Start and initialize a new BookKeeper client.
        Returns:
        the client
        Throws:
        BKException
        java.lang.InterruptedException
        java.io.IOException