Interface RemoteStreamer<M,P extends BufferWriter>

Type Parameters:
M - associated metadata with a single stream
P - the payload type that can be pushed to the stream
All Known Implementing Classes:
RemoteStreamerImpl
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RemoteStreamer<M,P extends BufferWriter>
A RemoteStreamer allows to push data back to a single gateway (any). It keeps track of multiple RemoteStream instances, each with their own streamType. The semantics of the streamType, associated with the metadata and payload, are owned by the consumer of the API.
  • Method Details

    • streamFor

      Optional<RemoteStream<M,P>> streamFor(org.agrona.DirectBuffer streamType, Predicate<M> filter)
      Returns a valid stream for the given streamType, or Optional.empty() if there is none.

      The predicate should return false to exclude streams from the list of possible streams.

      Parameters:
      streamType - the job type to look for
      filter - 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
    • streamFor

      default Optional<RemoteStream<M,P>> streamFor(org.agrona.DirectBuffer jobType)
      Returns a valid stream for the given streamType, or Optional.empty() if there is none.