public MIGRATE( IPEndPoint ipEndPoint, IReadOnlyList <Key> keys, DatabaseNumber destinationDb, MillisecondsTimeout timeout, SourceKeyBehavior sourceKeyBehavior, DestinationKeyBehavior destinationKeyBehavior, Auth auth) { if (sourceKeyBehavior != SourceKeyBehavior.Move && sourceKeyBehavior != SourceKeyBehavior.Copy) { throw new ArgumentException( $"Must be either Move or Copy, but {sourceKeyBehavior} found", nameof(sourceKeyBehavior) ); } if (destinationKeyBehavior != DestinationKeyBehavior.Replace && destinationKeyBehavior != DestinationKeyBehavior.EnsureKeyExists) { throw new ArgumentException( $"Must be either Replace or EnsureKeyExists, but {destinationKeyBehavior} found", nameof(destinationKeyBehavior) ); } this.ipEndPoint = ipEndPoint; this.keys = keys; this.destinationDb = destinationDb; this.timeout = timeout; this.sourceKeyBehavior = sourceKeyBehavior; this.destinationKeyBehavior = destinationKeyBehavior; this.auth = auth; }
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>) { }
public WAIT(long numReplicas, MillisecondsTimeout timeout) { if (numReplicas <= 0) { var message = numReplicas == 0 ? "Zero replicas is meaningless" : "Number of replicas must be positive"; throw new ArgumentOutOfRangeException(nameof(numReplicas), numReplicas, message); } this.numReplicas = numReplicas; this.timeout = timeout; }
public MIGRATE( IPEndPoint ipEndPoint, IReadOnlyList <Key> keys, DatabaseNumber destinationDb, MillisecondsTimeout timeout) : this( ipEndPoint, keys, destinationDb, timeout, SourceKeyBehavior.Move, DestinationKeyBehavior.EnsureKeyExists, NoAuth.Singleton ) { }
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; }
public PAUSE(MillisecondsTimeout timeout) { this.timeout = timeout; }
public BLOCK(Count count, MillisecondsTimeout blockTimeout, params (Key Key, Offset Offset)[] streams)