public class DistributedAsyncBiFunctionService<K,REQ,RES> extends DistributedService<K,AsyncBiFunctionService<K,REQ,RES>> implements AsyncBiFunctionService<K,REQ,RES>
AsyncBiFunctionService.WithSerdes<K,REQ,RES>
Constructor and Description |
---|
DistributedAsyncBiFunctionService(org.apache.kafka.streams.KafkaStreams streams,
org.apache.kafka.streams.state.HostInfo localApplicationServer,
String storeName,
LocalService<? extends AsyncBiFunctionService.WithSerdes<K,REQ,RES>> localService,
Function<? super org.apache.kafka.streams.state.HostInfo,? extends io.grpc.Channel> grpcChannelProvider) |
Modifier and Type | Method and Description |
---|---|
Stream<CompletionStage<RES>> |
apply()
Apply to all services, with null key and request - if they can handle it.
|
CompletionStage<RES> |
apply(K key,
REQ req) |
Stream<CompletionStage<RES>> |
applyForStore()
Apply to all services for store, with null key and request - if they can handle it.
|
protected AsyncBiFunctionService<K,REQ,RES> |
localService(String storeName,
org.apache.kafka.streams.KafkaStreams streams) |
protected AsyncBiFunctionService<K,REQ,RES> |
remoteServiceGrpcClient(String storeName,
io.grpc.Channel channel,
org.apache.kafka.common.serialization.Serde<K> keySerde) |
allServices, allServicesForStore, allServicesForStoreStream, allServicesStream, close, getKeySerde, serviceForKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
close
public DistributedAsyncBiFunctionService(org.apache.kafka.streams.KafkaStreams streams, org.apache.kafka.streams.state.HostInfo localApplicationServer, String storeName, LocalService<? extends AsyncBiFunctionService.WithSerdes<K,REQ,RES>> localService, Function<? super org.apache.kafka.streams.state.HostInfo,? extends io.grpc.Channel> grpcChannelProvider)
public CompletionStage<RES> apply(K key, REQ req)
apply
in interface BiFunction<K,REQ,CompletionStage<RES>>
public Stream<CompletionStage<RES>> applyForStore()
AsyncBiFunctionService
applyForStore
in interface AsyncBiFunctionService<K,REQ,RES>
public Stream<CompletionStage<RES>> apply()
AsyncBiFunctionService
apply
in interface AsyncBiFunctionService<K,REQ,RES>
protected AsyncBiFunctionService<K,REQ,RES> localService(String storeName, org.apache.kafka.streams.KafkaStreams streams)
localService
in class DistributedService<K,AsyncBiFunctionService<K,REQ,RES>>
protected AsyncBiFunctionService<K,REQ,RES> remoteServiceGrpcClient(String storeName, io.grpc.Channel channel, org.apache.kafka.common.serialization.Serde<K> keySerde)
remoteServiceGrpcClient
in class DistributedService<K,AsyncBiFunctionService<K,REQ,RES>>
Copyright © 2020 Red Hat. All rights reserved.