com.basho.riak.client.raw.pbc
Class PBClientConfig.Builder

java.lang.Object
  extended by com.basho.riak.client.raw.pbc.PBClientConfig.Builder
Enclosing class:
PBClientConfig

public static final class PBClientConfig.Builder
extends Object

Builder for the PBClientConfig Has the following default values:

field default
socketBufferSizeKb 16
host 127.0.0.1
port 8087
poolSize 0 (unlimited)
initialPoolSize 0
idleConnectionTTLMillis 1000 (idle connections will be closed after 1 second)
connectionWaitTimeoutMillis 1000 (if a connection cannot be acquired within this time and exception is thrown)

Author:
russell

Constructor Summary
PBClientConfig.Builder()
           
 
Method Summary
 PBClientConfig build()
           
static PBClientConfig.Builder from(PBClientConfig copyConfig)
          Create a new builder with values all copied from copyConfig
 PBClientConfig.Builder withConnectionTimeoutMillis(long connectionTimeoutMillis)
           
 PBClientConfig.Builder withHost(String host)
           
 PBClientConfig.Builder withIdleConnectionTTLMillis(long idleConnectionTTLMillis)
           
 PBClientConfig.Builder withInitialPoolSize(int initialPoolSize)
           
 PBClientConfig.Builder withPoolSize(int poolSize)
           
 PBClientConfig.Builder withPort(int port)
           
 PBClientConfig.Builder withSocketBufferSizeKb(int socketBufferSizeKb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBClientConfig.Builder

public PBClientConfig.Builder()
Method Detail

build

public PBClientConfig build()

from

public static PBClientConfig.Builder from(PBClientConfig copyConfig)
Create a new builder with values all copied from copyConfig

Parameters:
copyConfig - the PBClientConfig to copy values from
Returns:
a new PBClientConfig.Builder populated with copyConfig's values.

withSocketBufferSizeKb

public PBClientConfig.Builder withSocketBufferSizeKb(int socketBufferSizeKb)

withHost

public PBClientConfig.Builder withHost(String host)

withPort

public PBClientConfig.Builder withPort(int port)

withPoolSize

public PBClientConfig.Builder withPoolSize(int poolSize)

withInitialPoolSize

public PBClientConfig.Builder withInitialPoolSize(int initialPoolSize)

withIdleConnectionTTLMillis

public PBClientConfig.Builder withIdleConnectionTTLMillis(long idleConnectionTTLMillis)

withConnectionTimeoutMillis

public PBClientConfig.Builder withConnectionTimeoutMillis(long connectionTimeoutMillis)


Copyright © 2012. All Rights Reserved.