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

java.lang.Object
  extended by com.basho.riak.client.raw.pbc.PBClientConfig
All Implemented Interfaces:
Configuration

public class PBClientConfig
extends Object
implements Configuration

The set of configuration parameters needed to configure a Protocol Buffers client

Author:
russell

Nested Class Summary
static class PBClientConfig.Builder
          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)
 
Method Summary
static PBClientConfig defaults()
          Create an instance with all default values.
 long getConnectionWaitTimeoutMillis()
           
 String getHost()
           
 long getIdleConnectionTTLMillis()
           
 int getInitialPoolSize()
           
 int getPoolSize()
           
 int getPort()
           
 int getSocketBufferSizeKb()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

defaults

public static PBClientConfig defaults()
Create an instance with all default values. See the builder for the default values.

Returns:
an instance configured as per the builder defaults
See Also:
PBClientConfig.Builder

getSocketBufferSizeKb

public int getSocketBufferSizeKb()
Returns:
the size of each buffer for the connection (1 each for read, write and socket)

getHost

public String getHost()
Returns:
the host address of the pb interface

getPort

public int getPort()
Returns:
the port

getPoolSize

public int getPoolSize()
Returns:
the total maximum connection pool size

getInitialPoolSize

public int getInitialPoolSize()
Returns:
the initial pool size

getIdleConnectionTTLMillis

public long getIdleConnectionTTLMillis()
Returns:
the TTL (in milliseconds) of idle connections in the pool

getConnectionWaitTimeoutMillis

public long getConnectionWaitTimeoutMillis()
Returns:
the how long to block (in milliseconds) when acquiring a connection


Copyright © 2012. All Rights Reserved.