Class RemoteStreamRegistry<M>
java.lang.Object
io.camunda.zeebe.transport.stream.impl.RemoteStreamRegistry<M>
- Type Parameters:
M- the type of the properties of the stream.
- All Implemented Interfaces:
ImmutableStreamRegistry<M>
A registry for remote streams. The streams are typically between broker and the gateway, where
the broker pushes data to the stream and the gateway consumes them.
A stream is uniquely identified by the streamId and the receiver. A stream has also an associated type and properties. Two streams with the same type and properties can consume the same data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.camunda.zeebe.transport.stream.impl.ImmutableStreamRegistry
ImmutableStreamRegistry.StreamConsumer<M>, ImmutableStreamRegistry.StreamId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a stream receiver that can receive data from the stream with the given streamType.voidclear()get(org.agrona.concurrent.UnsafeBuffer streamType) Returns a set of streams for the given type.voidRemoves the stream.voidRemoves all stream from the given receiver
-
Constructor Details
-
RemoteStreamRegistry
public RemoteStreamRegistry()
-
-
Method Details
-
add
public void add(org.agrona.concurrent.UnsafeBuffer streamType, UUID streamId, MemberId receiver, M properties) Adds a stream receiver that can receive data from the stream with the given streamType.- Parameters:
streamType- type of the streamstreamId- id of the stream. The pair (receiver, streamId) must uniquely identify the stream.receiver- The id of the node that receives data from the streamproperties- properties used by the producer to generate data to be pushed to the stream
-
remove
Removes the stream.- Parameters:
streamId- id of the streamreceiver- The id of the node that receives data from the stream
-
removeAll
Removes all stream from the given receiver- Parameters:
receiver- id of the node
-
get
public Set<ImmutableStreamRegistry.StreamConsumer<M>> get(org.agrona.concurrent.UnsafeBuffer streamType) Description copied from interface:ImmutableStreamRegistryReturns a set of streams for the given type.Implementations of this must be thread-safe.
- Specified by:
getin interfaceImmutableStreamRegistry<M>- Parameters:
streamType- type of the stream- Returns:
- set of streams for the given type
-
clear
public void clear()
-