Package io.github.dhruv1110.jcachex.impl
Class DefaultDistributedCache.Builder<K,V>
- java.lang.Object
-
- io.github.dhruv1110.jcachex.impl.DefaultDistributedCache.Builder<K,V>
-
- All Implemented Interfaces:
DistributedCache.Builder<K,V>
- Enclosing class:
- DefaultDistributedCache<K,V>
public static class DefaultDistributedCache.Builder<K,V> extends Object implements DistributedCache.Builder<K,V>
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
clusterName
public DefaultDistributedCache.Builder<K,V> clusterName(String clusterName)
- Specified by:
clusterName
in interfaceDistributedCache.Builder<K,V>
-
nodes
public DefaultDistributedCache.Builder<K,V> nodes(String... nodeAddresses)
- Specified by:
nodes
in interfaceDistributedCache.Builder<K,V>
-
nodes
public DefaultDistributedCache.Builder<K,V> nodes(Collection<String> nodeAddresses)
- Specified by:
nodes
in interfaceDistributedCache.Builder<K,V>
-
replicationFactor
public DefaultDistributedCache.Builder<K,V> replicationFactor(int replicationFactor)
- Specified by:
replicationFactor
in interfaceDistributedCache.Builder<K,V>
-
consistencyLevel
public DefaultDistributedCache.Builder<K,V> consistencyLevel(DistributedCache.ConsistencyLevel consistencyLevel)
- Specified by:
consistencyLevel
in interfaceDistributedCache.Builder<K,V>
-
partitionCount
public DefaultDistributedCache.Builder<K,V> partitionCount(int partitionCount)
- Specified by:
partitionCount
in interfaceDistributedCache.Builder<K,V>
-
networkTimeout
public DefaultDistributedCache.Builder<K,V> networkTimeout(Duration networkTimeout)
- Specified by:
networkTimeout
in interfaceDistributedCache.Builder<K,V>
-
enableReadRepair
public DefaultDistributedCache.Builder<K,V> enableReadRepair(boolean enabled)
- Specified by:
enableReadRepair
in interfaceDistributedCache.Builder<K,V>
-
enableAutoDiscovery
public DefaultDistributedCache.Builder<K,V> enableAutoDiscovery(boolean enabled)
- Specified by:
enableAutoDiscovery
in interfaceDistributedCache.Builder<K,V>
-
gossipInterval
public DefaultDistributedCache.Builder<K,V> gossipInterval(Duration gossipInterval)
- Specified by:
gossipInterval
in interfaceDistributedCache.Builder<K,V>
-
maxReconnectAttempts
public DefaultDistributedCache.Builder<K,V> maxReconnectAttempts(int maxAttempts)
- Specified by:
maxReconnectAttempts
in interfaceDistributedCache.Builder<K,V>
-
compressionEnabled
public DefaultDistributedCache.Builder<K,V> compressionEnabled(boolean enabled)
- Specified by:
compressionEnabled
in interfaceDistributedCache.Builder<K,V>
-
encryptionEnabled
public DefaultDistributedCache.Builder<K,V> encryptionEnabled(boolean enabled)
- Specified by:
encryptionEnabled
in interfaceDistributedCache.Builder<K,V>
-
cacheConfig
public DefaultDistributedCache.Builder<K,V> cacheConfig(CacheConfig<K,V> cacheConfig)
-
build
public DistributedCache<K,V> build()
- Specified by:
build
in interfaceDistributedCache.Builder<K,V>
-
-