public abstract class DistributedReadOnlyStateStore<K,V,ROS> extends DistributedService<K,ROS>
Constructor and Description |
---|
DistributedReadOnlyStateStore(org.apache.kafka.streams.KafkaStreams streams,
org.apache.kafka.streams.state.HostInfo localApplicationServer,
String storeName,
org.apache.kafka.common.serialization.Serde<K> keySerde,
org.apache.kafka.common.serialization.Serde<V> valSerde,
Function<? super org.apache.kafka.streams.state.HostInfo,? extends io.grpc.Channel> grpcChannelProvider,
boolean parallel) |
Modifier and Type | Method and Description |
---|---|
protected ROS |
remoteServiceGrpcClient(String storeName,
io.grpc.Channel channel,
org.apache.kafka.common.serialization.Serde<K> keySerde) |
protected abstract ROS |
remoteServiceGrpcClient(String storeName,
io.grpc.Channel channel,
org.apache.kafka.common.serialization.Serde<K> keySerde,
org.apache.kafka.common.serialization.Serde<V> valSerde) |
allServices, allServicesForStore, allServicesForStoreStream, allServicesStream, close, getKeySerde, localService, serviceForKey
public DistributedReadOnlyStateStore(org.apache.kafka.streams.KafkaStreams streams, org.apache.kafka.streams.state.HostInfo localApplicationServer, String storeName, org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valSerde, Function<? super org.apache.kafka.streams.state.HostInfo,? extends io.grpc.Channel> grpcChannelProvider, boolean parallel)
streams
- The KafkaStreams
applicationlocalApplicationServer
- The HostInfo
derived from the
application.server
configuration property of local kafka streams node for the streams application.
This is used to identify requests for local store, bypassing gRPC callsstoreName
- The name of the ReadOnlyWindowStore
registered in the streams applicationkeySerde
- The Serde
for keys of the storevalSerde
- The Serde
for values of the storegrpcChannelProvider
- A function that establishes gRPC Channel
to a remote store service
for the given HostInfo
parameterparallel
- true
if lookups that need to query many stores in the cluster are
to be performed in parallelprotected final ROS remoteServiceGrpcClient(String storeName, io.grpc.Channel channel, org.apache.kafka.common.serialization.Serde<K> keySerde)
remoteServiceGrpcClient
in class DistributedService<K,ROS>
Copyright © 2020 Red Hat. All rights reserved.