DataStream<T extends DataStreamConfig, M extends IMessage<IMessageType>> class abstract

A data stream used for transmitting actual data samples.

Inheritance
Implementers

Constructors

DataStream(T config, {List<Node>? producers, List<Node>? consumers})
Creates a data stream with the given DataStreamConfig.

Properties

carriesSenderClock → bool
Whether this transport already puts the sender's clock on the wire.
no setterinherited
channelCount → int
Number of channels in the stream.
no setterinherited
clockSyncs → Stream<ClockSyncSample>
Clock-offset estimates for this stream's peers, as they are made.
no setterinherited
config → T
Configuration for the stream. This is a NetworkStreamConfig object.
finalinherited
consumers → List<String>
List of consumer node IDs.
no setterinherited
created → bool
Indicates whether the ILifecycle implementation has been created.
no setterinherited
dataType → StreamDataType
Data type of the stream. This is a StreamDataType enum value.
no setterinherited
description → String?
Returns a description of the identity.
no setterinherited
disposed → bool
Indicates whether the ILifecycle implementation has been disposed.
no setterinherited
hasConsumers → bool
Whether the stream has any current consumers.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasProducers → bool
Whether the stream has any current producers.
no setterinherited
id → String
Identifier for the stream, derived from the config hash code.
no setterinherited
inbox → Stream<M>
Incoming messages from peers.
no setterinherited
inletHealth → Stream<InletHealth>
Emits when this stream stops, or resumes, receiving from one peer for a reason of its own rather than the peer's: see InletHealth.
no setterinherited
manager → IResourceManager?
gets the resource manager that manages this resource
no setterinherited
messageClass → Type
no setterinherited
name → String
Human-readable name for the stream.
no setterinherited
outbox → StreamSink<M>
no setterinherited
outletConsumerPresence → Stream<bool>
Emits when this stream's publishing endpoint gains or loses every subscriber, where the transport can tell.
no setterinherited
paused → bool
no setterinherited
producers → List<String>
List of producer node IDs.
no setterinherited
relaysSourceClock → bool
Whether this transport can pass a sample on with the timestamp its origin gave it (sendDataAt, upstream).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate → double
Sample rate of the stream.
no setterinherited
sharesSenderClockDomain → bool
Whether both ends of this stream read the same PeerClock.
no setterinherited
started → bool
Whether the stream is currently running.
no setterinherited
uId → String
Returns a unique identifier that is guaranteed to be globally unique.
no setterinherited
upstream ↔ ClockChain
How sendDataAt's source clock maps onto this node's PeerClock: the hops the stream crossed to get here.
getter/setter pair

Methods

addConsumer(Node consumer) → void
Adds a consumer node to this stream.
inherited
addInlet(PeerHandle handle) → Future<void>
Subscribes to a peer found by discovery.
inherited
addProducer(Node producer) → void
Adds a producer node to this stream.
inherited
create() → FutureOr<void>
Creates.
inherited
createInletsForNodes(Iterable<Node> nodes, {Duration resolveTimeout = const Duration(seconds: 10)}) → Future<void>
Subscribes to every node in nodes, resolving their endpoints first.
inherited
createOutlet() → Future<void>
Creates this node's publishing endpoint.
inherited
destroyStream() → Future<void>
Stops and releases the stream's endpoints.
inherited
dispose() → FutureOr<void>
Disposes the ILifecycle implementation, releasing any resources.
inherited
flushStreams() → Future<void>
Discards anything buffered.
inherited
isConsumer(Node node) → bool
Checks if a given node is a consumer for this stream.
inherited
isProducer(Node node) → bool
Checks if a given node is a producer for this stream.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → FutureOr<void>
Pauses the implementation.
inherited
pauseStream() → Future<void>
Pauses, if running and not already paused.
inherited
recreateOutlet() → Future<void>
Recreates the publishing endpoint to reflect a changed Node.
inherited
removeInlet(String nodeUId) → Future<void>
Unsubscribes from a peer, releasing whatever that inlet holds.
inherited
resume() → FutureOr<void>
Resumes the implementation.
inherited
resumeStream({bool flushBeforeResume = true}) → Future<void>
Resumes, if running and paused.
inherited
resumeWith({bool flushBeforeResume = true}) → Future<void>
Resumes, optionally discarding data buffered while paused.
inherited
sendData(Iterable data) → Future<void>
Publishes one sample: exactly NetworkStream.channelCount values whose runtime types match NetworkStream.dataType.
sendDataAt(double sourceClock, Iterable data) → Future<void>
sendData for a sample that came from somewhere else: sourceClock is the time its origin stamped it with, in seconds on the origin's clock, and travels in place of this node's send time.
sendDataTyped<S>(Iterable<S> data) → Future<void>
sendData for a statically known element type.
sendMessage(M message) → FutureOr<void>
override
start() → Future<void>
Begins publishing and delivering. Idempotent.
inherited
stop() → Future<void>
Stops publishing and delivering, but keeps the stream usable.
inherited
toString() → String
A string representation of this object.
inherited
updateManager(IResourceManager? newManager) → FutureOr<void>
inherited
updateNode(Node newNode) → void
Replaces the Node this stream publishes as.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited