public class CacheClientBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheClientBuilder.Mode |
| Modifier and Type | Method and Description |
|---|---|
CacheClient |
build()
Builds up the client. in LOCAL mode eventually a local embedded
CacheServer will be started too.
|
CacheClientBuilder |
clientId(String clientId)
The the ID of the client, it MUST be unique, it represent the peer on the
network
|
CacheClientBuilder |
clientSecret(String clientSecret)
Secret for autentication to the CacheServer
|
CacheClientBuilder |
connectTimeout(int connectTimeout)
Connection timeout for sockets
|
CacheClientBuilder |
host(String host)
Host of the server for the SINGLESERVER mode
|
CacheClientBuilder |
localCacheServer(Object cacheServer)
Pass a custom local CacheServer for LOCAL mode
|
CacheClientBuilder |
maxMemory(long maxMemory)
Limit on the memory retained by the cache, the value is expressed in
bytes
|
CacheClientBuilder |
mode(CacheClientBuilder.Mode mode)
Discovery mode
|
static CacheClientBuilder |
newBuilder() |
CacheClientBuilder |
port(int port)
Port of the server for the SINGLESERVER mode
|
CacheClientBuilder |
socketTimeout(int socketTimeout)
Socket timeout for sockets
|
CacheClientBuilder |
ssl(boolean ssl)
SSL mode for the SINGLESERVER mode
|
CacheClientBuilder |
zkConnectString(String zkConnectString)
Zookeeper connection string
|
CacheClientBuilder |
zkPath(String zkPath)
Zookeeper Path for discovery
|
CacheClientBuilder |
zkSessionTimeout(int zkSessionTimeout)
Timeout for the Zookeeper client
|
public static CacheClientBuilder newBuilder()
public CacheClientBuilder clientId(String clientId)
clientId - public CacheClientBuilder zkPath(String zkPath)
zkPath - public CacheClientBuilder zkConnectString(String zkConnectString)
zkConnectString - public CacheClientBuilder localCacheServer(Object cacheServer)
cacheServer - public CacheClientBuilder zkSessionTimeout(int zkSessionTimeout)
public CacheClientBuilder maxMemory(long maxMemory)
maxMemory - public CacheClientBuilder port(int port)
port - public CacheClientBuilder host(String host)
host - public CacheClientBuilder ssl(boolean ssl)
ssl - public CacheClientBuilder connectTimeout(int connectTimeout)
connectTimeout - public CacheClientBuilder socketTimeout(int socketTimeout)
socketTimeout - public CacheClientBuilder mode(CacheClientBuilder.Mode mode)
mode - CacheClientBuilder.Modepublic CacheClientBuilder clientSecret(String clientSecret)
clientSecret - public CacheClient build()
CacheClient.start(),
CacheClient.waitForConnection(int)Copyright © 2016. All rights reserved.