K
- Stream key and Stream field type.public static class StreamReceiver.StreamReceiverOptionsBuilder<K,V extends Record<K,?>> extends Object
StreamReceiver.StreamReceiverOptions
.public StreamReceiver.StreamReceiverOptionsBuilder<K,V> pollTimeout(Duration pollTimeout)
BLOCK
option during reading.pollTimeout
- must not be null or negative.this
StreamReceiver.StreamReceiverOptionsBuilder
.public StreamReceiver.StreamReceiverOptionsBuilder<K,V> batchSize(int recordsPerPoll)
COUNT
option during reading.recordsPerPoll
- must not be greater zero.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <T> StreamReceiver.StreamReceiverOptionsBuilder<T,MapRecord<T,T,T>> serializer(RedisSerializationContext.SerializationPair<T> pair)
pair
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <T> StreamReceiver.StreamReceiverOptionsBuilder<T,MapRecord<T,T,T>> serializer(RedisSerializationContext<T,?> serializationContext)
serializationContext
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <NK,NV extends Record<NK,?>> StreamReceiver.StreamReceiverOptionsBuilder<NK,NV> keySerializer(RedisSerializationContext.SerializationPair<NK> pair)
pair
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <HK,HV> StreamReceiver.StreamReceiverOptionsBuilder<K,MapRecord<K,HK,HV>> hashKeySerializer(RedisSerializationContext.SerializationPair<HK> pair)
pair
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <HK,HV> StreamReceiver.StreamReceiverOptionsBuilder<K,MapRecord<K,HK,HV>> hashValueSerializer(RedisSerializationContext.SerializationPair<HK> pair)
pair
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <NV> StreamReceiver.StreamReceiverOptionsBuilder<K,ObjectRecord<K,NV>> targetType(Class<NV> targetType)
Record
type to ObjectRecord
.targetType
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public <NV> StreamReceiver.StreamReceiverOptionsBuilder<K,ObjectRecord<K,NV>> objectMapper(HashMapper<NV,?,?> hashMapper)
Record
type to ObjectRecord
.hashMapper
- must not be null.this
StreamReceiver.StreamReceiverOptionsBuilder
.public StreamReceiver.StreamReceiverOptions<K,V> build()
StreamReceiver.StreamReceiverOptions
.StreamReceiver.StreamReceiverOptions
.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.