Exemple #1
0
 public New(
     GroupName groupName,
     ConsumerName consumerName,
     Count count,
     Mode mode,
     params Key[] streams)
     : this(groupName, consumerName, count, mode, streams as IReadOnlyList <Key>)
 {
 }
Exemple #2
0
 public BLOCK(
     GroupName groupName,
     ConsumerName consumerName,
     Count count,
     MillisecondsTimeout blockTimeout,
     Mode mode,
     params Key[] streams)
     : this(groupName, consumerName, count, blockTimeout, mode, streams as IReadOnlyList <Key>)
 {
 }
Exemple #3
0
        public XACK(Key key, GroupName groupName, IReadOnlyList <Id> ids)
        {
            this.key       = key ?? throw new ArgumentNullException(nameof(key));
            this.groupName = groupName;
            this.ids       = ids ?? throw new ArgumentNullException(nameof(ids));

            if (ids.Count < 1)
            {
                throw new ArgumentException("Must contain elements", nameof(ids));
            }
        }
Exemple #4
0
 public New(
     GroupName groupName,
     ConsumerName consumerName,
     Count count,
     Mode mode,
     IReadOnlyList <Key> streams)
 {
     this.groupName    = groupName;
     this.consumerName = consumerName;
     this.count        = count;
     this.mode         = mode;
     this.streams      = streams;
 }
Exemple #5
0
            public CREATE(Key key, GroupName groupName, Offset offset, Mode mode)
            {
                if (mode != Mode.NotCreateStream && mode != Mode.CreateStreamIfNotExists)
                {
                    throw new ArgumentException(
                              $"Must be either NotCreateStream or CreateStreamIfNotExists, but {mode} found",
                              nameof(mode)
                              );
                }

                this.key       = key ?? throw new ArgumentNullException(nameof(key));
                this.groupName = groupName;
                this.offset    = offset;
                this.mode      = mode;
            }
Exemple #6
0
            public Detailed(
                Key key,
                GroupName groupName,
                Interval interval,
                long count)
            {
                if (count < 1)
                {
                    throw new ArgumentOutOfRangeException(nameof(count), count, "Must be positive");
                }

                this.key       = key ?? throw new ArgumentNullException(nameof(key));
                this.groupName = groupName;
                this.interval  = interval ?? throw new ArgumentNullException(nameof(interval));
                this.count     = count;
            }
Exemple #7
0
 public BLOCK(
     GroupName groupName,
     ConsumerName consumerName,
     Count count,
     MillisecondsTimeout blockTimeout,
     Mode mode,
     IReadOnlyList <Key> streams)
 {
     ValidateMode(mode);
     this.groupName    = groupName;
     this.consumerName = consumerName;
     this.count        = count ?? throw new ArgumentNullException(nameof(count));
     this.blockTimeout = blockTimeout;
     this.streams      = streams ?? throw new ArgumentNullException(nameof(streams));
     this.mode         = mode;
 }
Exemple #8
0
        public XCLAIM(
            Key key,
            GroupName groupName,
            ConsumerName consumerName,
            Milliseconds minimumIdleTime,
            IReadOnlyList <Id> ids)
        {
            if (ids == null)
            {
                throw new ArgumentNullException(nameof(ids));
            }
            if (ids.Count < 1)
            {
                throw new ArgumentException("Must contain items", nameof(ids));
            }

            this.key             = key ?? throw new ArgumentNullException(nameof(key));
            this.groupName       = groupName;
            this.consumerName    = consumerName;
            this.minimumIdleTime = minimumIdleTime;
            this.ids             = ids;
        }
Exemple #9
0
 public SETID(Key key, GroupName groupName, Offset offset)
 {
     this.key       = key;
     this.groupName = groupName;
     this.offset    = offset;
 }
Exemple #10
0
 public XPENDING(Key key, GroupName groupName)
 {
     this.key       = key;
     this.groupName = groupName;
 }
Exemple #11
0
 public DELCONSUMER(Key key, GroupName groupName, ConsumerName consumerName)
 {
     this.key          = key ?? throw new ArgumentNullException(nameof(key));
     this.groupName    = groupName;
     this.consumerName = consumerName;
 }
Exemple #12
0
 public XACK(Key key, GroupName groupName, params Id[] ids)
     : this(key, groupName, ids as IReadOnlyList <Id>)
 {
 }
Exemple #13
0
 public CONSUMERS(Key key, GroupName groupName)
 {
     this.key       = key ?? throw new ArgumentNullException(nameof(key));
     this.groupName = groupName;
 }
 public DESTROY(Key key, GroupName groupName)
 {
     this.key       = key;
     this.groupName = groupName;
 }