Interface RedisSerializationContext.RedisSerializationContextBuilder<K,V>
- Enclosing interface:
- RedisSerializationContext<K,
V>
public static interface RedisSerializationContext.RedisSerializationContextBuilder<K,V>
Builder for
RedisSerializationContext
.- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aRedisSerializationContext
.hashKey
(RedisElementReader<?> reader, RedisElementWriter<?> writer) Set the hash keyRedisElementReader
andRedisElementWriter
.Set the hash keyRedisSerializationContext.SerializationPair
.hashKey
(RedisSerializer<?> serializer) Set the hash keyRedisSerializationContext.SerializationPair
given aRedisSerializer
.hashValue
(RedisElementReader<?> reader, RedisElementWriter<?> writer) Set the hash valueRedisElementReader
andRedisElementWriter
.Set the hash valueRedisSerializationContext.SerializationPair
.hashValue
(RedisSerializer<?> serializer) Set the hash valueRedisSerializationContext.SerializationPair
given aRedisSerializer
.key
(RedisElementReader<K> reader, RedisElementWriter<K> writer) Set the keyRedisElementReader
andRedisElementWriter
.Set the keyRedisSerializationContext.SerializationPair
.key
(RedisSerializer<K> serializer) Set the keyRedisSerializationContext.SerializationPair
given aRedisSerializer
.string
(RedisElementReader<String> reader, RedisElementWriter<String> writer) Set the stringRedisElementReader
andRedisElementWriter
.Set the stringRedisSerializationContext.SerializationPair
.string
(RedisSerializer<String> serializer) Set the stringRedisSerializationContext.SerializationPair
given aRedisSerializer
.value
(RedisElementReader<V> reader, RedisElementWriter<V> writer) Set the valueRedisElementReader
andRedisElementWriter
.Set the valueRedisSerializationContext.SerializationPair
.value
(RedisSerializer<V> serializer) Set the valueRedisSerializationContext.SerializationPair
given aRedisSerializer
.
-
Method Details
-
key
RedisSerializationContext.RedisSerializationContextBuilder<K,V> key(RedisSerializationContext.SerializationPair<K> pair) Set the keyRedisSerializationContext.SerializationPair
.- Parameters:
pair
- must not be null.- Returns:
- this builder.
-
key
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> key(RedisElementReader<K> reader, RedisElementWriter<K> writer) Set the keyRedisElementReader
andRedisElementWriter
.- Parameters:
reader
- must not be null.writer
- must not be null.- Returns:
- this builder.
-
key
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> key(RedisSerializer<K> serializer) Set the keyRedisSerializationContext.SerializationPair
given aRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- this builder.
-
value
RedisSerializationContext.RedisSerializationContextBuilder<K,V> value(RedisSerializationContext.SerializationPair<V> pair) Set the valueRedisSerializationContext.SerializationPair
.- Parameters:
pair
- must not be null.- Returns:
- this builder.
-
value
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> value(RedisElementReader<V> reader, RedisElementWriter<V> writer) Set the valueRedisElementReader
andRedisElementWriter
.- Parameters:
reader
- must not be null.writer
- must not be null.- Returns:
- this builder.
-
value
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> value(RedisSerializer<V> serializer) Set the valueRedisSerializationContext.SerializationPair
given aRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- this builder.
-
hashKey
RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashKey(RedisSerializationContext.SerializationPair<?> pair) Set the hash keyRedisSerializationContext.SerializationPair
.- Parameters:
pair
- must not be null.- Returns:
- this builder.
-
hashKey
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashKey(RedisElementReader<?> reader, RedisElementWriter<?> writer) Set the hash keyRedisElementReader
andRedisElementWriter
.- Parameters:
reader
- must not be null.writer
- must not be null.- Returns:
- this builder.
-
hashKey
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashKey(RedisSerializer<?> serializer) Set the hash keyRedisSerializationContext.SerializationPair
given aRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- this builder.
-
hashValue
RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashValue(RedisSerializationContext.SerializationPair<?> pair) Set the hash valueRedisSerializationContext.SerializationPair
.- Parameters:
pair
- must not be null.- Returns:
- this builder.
-
hashValue
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashValue(RedisElementReader<?> reader, RedisElementWriter<?> writer) Set the hash valueRedisElementReader
andRedisElementWriter
.- Parameters:
reader
- must not be null.writer
- must not be null.- Returns:
- this builder.
-
hashValue
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> hashValue(RedisSerializer<?> serializer) Set the hash valueRedisSerializationContext.SerializationPair
given aRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- this builder.
-
string
RedisSerializationContext.RedisSerializationContextBuilder<K,V> string(RedisSerializationContext.SerializationPair<String> pair) Set the stringRedisSerializationContext.SerializationPair
.- Parameters:
pair
- must not be null.- Returns:
- this builder.
-
string
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> string(RedisElementReader<String> reader, RedisElementWriter<String> writer) Set the stringRedisElementReader
andRedisElementWriter
.- Parameters:
reader
- must not be null.writer
- must not be null.- Returns:
- this builder.
-
string
default RedisSerializationContext.RedisSerializationContextBuilder<K,V> string(RedisSerializer<String> serializer) Set the stringRedisSerializationContext.SerializationPair
given aRedisSerializer
.- Parameters:
serializer
- must not be null.- Returns:
- this builder.
-
build
RedisSerializationContext<K,V> build()Builds aRedisSerializationContext
.- Returns:
- the
RedisSerializationContext
.
-