SubscriptionFilterOptions class

A class representing the options to use with server-side filtering. Server-side filtering is currently only supported on the SystemStreams.AllStream. Use checkpointInterval to control how often the server should send a checkpoint of current LogPosition of the SystemStreams.AllStream (default is every Defaults.CheckpointInterval events). This is useful in situations where the filter matches very few events of potential millions. If the client need to restart the subscription, the last checkpoint could be used to prevent replaying the filter on millions events again. You can pass a SubscriptionCheckpointCallback that is invoked and awaited when a checkpoint is reached. You can also listen the the EventStreamSubscription.checkpoints in EventStreamSubscription.

Constructors

SubscriptionFilterOptions(ReadFilter filter, {SubscriptionCheckpointCallback? checkpointReached, int checkpointInterval = Defaults.CheckpointInterval})
Constructs a new SubscriptionFilterOptions
SubscriptionFilterOptions.excludeSystemEvents({int maxSearchWindow = Defaults.MaxSearchWindow, SubscriptionCheckpointCallback? checkpointReached, int checkpointInterval = Defaults.CheckpointInterval})
Constructs a new SubscriptionFilterOptions with StreamFilter.excludeSystemEvents and optional checkpointInterval (default is Defaults.CheckpointInterval) and maxSearchWindow (default is Defaults.MaxSearchWindow). Use checkpointReached to get the checkpoint each
factory

Properties

checkpointInterval int
Sets how often the checkpointReached callback is called.
final
checkpointReached SubscriptionCheckpointCallback?
A SubscriptionCheckpointCallback invoked and awaited when a checkpoint is reached. Set the checkpointInterval to define how often this method is called by the server.
final
filter ReadFilter
The ReadFilter to apply.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

matches(Iterable<ResolvedEvent> events) Iterable<ResolvedEvent>
Filter events using this filter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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