public static class KeyValueConfiguration.Builder
extends java.lang.Object
new Builder().build()
will create a new KeyValueConfiguration.
Constructor and Description |
---|
Builder()
Default Builder
|
Builder(KeyValueConfiguration kvc)
Construct the builder by copying another configuration
|
Modifier and Type | Method and Description |
---|---|
KeyValueConfiguration.Builder |
addSource(Source source)
Add a source into the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
addSources(java.util.Collection<Source> sources)
Adds the sources into the KeyValueConfiguration
|
KeyValueConfiguration.Builder |
addSources(Source... sources)
Adds the sources into the KeyValueConfiguration
|
KeyValueConfiguration |
build()
Builds the KeyValueConfiguration
|
KeyValueConfiguration.Builder |
description(java.lang.String description)
Sets the description of the store.
|
KeyValueConfiguration.Builder |
maxBucketSize(long maxBucketSize)
Sets the maximum number of bytes in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
maxHistoryPerKey(int maxHistoryPerKey)
Sets the maximum number of history for any one key.
|
KeyValueConfiguration.Builder |
maxValueSize(long maxValueSize)
Sets the maximum size for an individual value in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
mirror(Mirror mirror)
Sets the mirror in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
name(java.lang.String name)
Sets the name of the store.
|
KeyValueConfiguration.Builder |
placement(Placement placement)
Sets the placement directive object
|
KeyValueConfiguration.Builder |
replicas(int replicas)
Sets the number of replicas a message must be stored on in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
republish(Republish republish)
Sets the Republish options
|
KeyValueConfiguration.Builder |
sources(java.util.Collection<Source> sources)
Sets the sources in the KeyValueConfiguration
|
KeyValueConfiguration.Builder |
sources(Source... sources)
Sets the sources in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
storageType(StorageType storageType)
Sets the storage type in the KeyValueConfiguration.
|
KeyValueConfiguration.Builder |
ttl(java.time.Duration ttl)
Sets the maximum age for a value in this KeyValueConfiguration.
|
public Builder()
public Builder(KeyValueConfiguration kvc)
kvc
- the configuration to copypublic KeyValueConfiguration.Builder name(java.lang.String name)
name
- name of the store.public KeyValueConfiguration.Builder description(java.lang.String description)
description
- description of the store.public KeyValueConfiguration.Builder maxHistoryPerKey(int maxHistoryPerKey)
maxHistoryPerKey
- the maximum historypublic KeyValueConfiguration.Builder maxBucketSize(long maxBucketSize)
maxBucketSize
- the maximum number of bytespublic KeyValueConfiguration.Builder maxValueSize(long maxValueSize)
maxValueSize
- the maximum size for a valuepublic KeyValueConfiguration.Builder ttl(java.time.Duration ttl)
ttl
- the maximum agepublic KeyValueConfiguration.Builder storageType(StorageType storageType)
storageType
- the storage typepublic KeyValueConfiguration.Builder replicas(int replicas)
replicas
- the number of replicaspublic KeyValueConfiguration.Builder placement(Placement placement)
placement
- the placement directive objectpublic KeyValueConfiguration.Builder republish(Republish republish)
republish
- the Republish objectpublic KeyValueConfiguration.Builder mirror(Mirror mirror)
mirror
- the KeyValue's mirrorpublic KeyValueConfiguration.Builder sources(Source... sources)
sources
- the KeyValue's sourcespublic KeyValueConfiguration.Builder sources(java.util.Collection<Source> sources)
sources
- the KeyValue's sourcespublic KeyValueConfiguration.Builder addSource(Source source)
source
- a KeyValue sourcepublic KeyValueConfiguration.Builder addSources(Source... sources)
sources
- the KeyValue's sources to addpublic KeyValueConfiguration.Builder addSources(java.util.Collection<Source> sources)
sources
- the KeyValue's sources to addpublic KeyValueConfiguration build()