Class RemoteStreamerImpl<M,P extends BufferWriter>
java.lang.Object
io.camunda.zeebe.scheduler.Actor
io.camunda.zeebe.transport.stream.impl.RemoteStreamerImpl<M,P>
- All Implemented Interfaces:
AsyncClosable,ConcurrencyControl,RemoteStreamer<M,,P> AutoCloseable,Executor
public final class RemoteStreamerImpl<M,P extends BufferWriter>
extends Actor
implements RemoteStreamer<M,P>
RemoteStreamImpl is an actor, and any payload pushed will be pushed asynchronously.
NOTE: any payload pushed is sent via the stream from RemoteStreamer.streamFor(DirectBuffer) will be
asynchronous, so the payload should be immutable, and the errors reported to the given RemoteStreamErrorHandler may be reported on different threads.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.camunda.zeebe.scheduler.Actor
Actor.ActorBuilder -
Field Summary
Fields inherited from class io.camunda.zeebe.scheduler.Actor
actor, ACTOR_PROP_NAME, ACTOR_PROP_PARTITION_ID -
Constructor Summary
ConstructorsConstructorDescriptionRemoteStreamerImpl(ClusterCommunicationService transport, io.camunda.zeebe.transport.stream.impl.ImmutableStreamRegistry<M> registry, RemoteStreamErrorHandler<P> errorHandler, RemoteStreamMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionReturns a valid stream for the given streamType, orOptional.empty()if there is none.Methods inherited from class io.camunda.zeebe.scheduler.Actor
buildActorName, call, close, closeAsync, createContext, getContext, getName, handleFailure, isActorClosed, newActor, onActorClosed, onActorCloseRequested, onActorClosing, onActorFailed, onActorStarted, onActorStarting, run, runOnCompletion, runOnCompletion, schedule, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.camunda.zeebe.scheduler.ConcurrencyControl
createCompletedFuture, createFuture, executeMethods inherited from interface io.camunda.zeebe.transport.stream.api.RemoteStreamer
streamFor
-
Constructor Details
-
RemoteStreamerImpl
public RemoteStreamerImpl(ClusterCommunicationService transport, io.camunda.zeebe.transport.stream.impl.ImmutableStreamRegistry<M> registry, RemoteStreamErrorHandler<P> errorHandler, RemoteStreamMetrics metrics)
-
-
Method Details
-
streamFor
public Optional<RemoteStream<M,P>> streamFor(org.agrona.DirectBuffer streamType, Predicate<M> filter) Description copied from interface:RemoteStreamerReturns a valid stream for the given streamType, orOptional.empty()if there is none.The predicate should return false to exclude streams from the list of possible streams.
- Specified by:
streamForin interfaceRemoteStreamer<M,P extends BufferWriter> - Parameters:
streamType- the job type to look forfilter- a filter to include/exclude eligible job streams based on their properties- Returns:
- a job stream which matches the type and given filter, or
Optional.empty()if none match
-