示例#1
0
        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;
        }
示例#2
0
 public MIGRATE(
     IPEndPoint ipEndPoint,
     IReadOnlyList <Key> keys,
     DatabaseNumber destinationDb,
     MillisecondsTimeout timeout)
     : this(
         ipEndPoint,
         keys,
         destinationDb,
         timeout,
         SourceKeyBehavior.Move,
         DestinationKeyBehavior.EnsureKeyExists,
         NoAuth.Singleton
         )
 {
 }
示例#3
0
文件: SELECT.cs 项目: pepelev/Rediska
 public SELECT(DatabaseNumber index)
 {
     this.index = index;
 }
示例#4
0
文件: SWAPDB.cs 项目: pepelev/Rediska
 public SWAPDB(DatabaseNumber db1, DatabaseNumber db2)
 {
     this.db1 = db1;
     this.db2 = db2;
 }
示例#5
0
文件: MOVE.cs 项目: pepelev/Rediska
 public MOVE(Key key, DatabaseNumber destinationDb)
 {
     this.key           = key;
     this.destinationDb = destinationDb;
 }