public WriteCommand(Cluster cluster, WritePolicy policy, Key key, Bin[] bins, Operation.Type operation)
 {
     this.cluster = cluster;
     this.policy = policy;
     this.key = key;
     this.partition = new Partition(key);
     this.bins = bins;
     this.operation = operation;
 }
 public AsyncWrite(AsyncCluster cluster, WritePolicy policy, WriteListener listener, Key key, Bin[] bins, Operation.Type operation)
     : base(cluster)
 {
     this.policy = policy;
     this.listener = listener;
     this.key = key;
     this.partition = new Partition(key);
     this.bins = bins;
     this.operation = operation;
 }
Exemplo n.º 3
0
        protected internal static Operation CreateRangeOperation(int command, Operation.Type type, string binName, CTX[] ctx, Value begin, Value end, int returnType)
        {
            Packer packer = new Packer();

            if (begin == null)
            {
                begin = Value.AsNull;
            }

            if (end == null)
            {
                CDT.Init(packer, ctx, command, 2);
                packer.PackNumber(returnType);
                begin.Pack(packer);
            }
            else
            {
                CDT.Init(packer, ctx, command, 3);
                packer.PackNumber(returnType);
                begin.Pack(packer);
                end.Pack(packer);
            }
            return(new Operation(type, binName, Value.Get(packer.ToByteArray())));
        }
Exemplo n.º 4
0
 public AsyncWrite(AsyncCluster cluster, WritePolicy writePolicy, WriteListener listener, Key key, Bin[] bins, Operation.Type operation)
     : base(cluster, writePolicy, new Partition(key), false)
 {
     this.writePolicy = writePolicy;
     this.listener    = listener;
     this.key         = key;
     this.bins        = bins;
     this.operation   = operation;
 }
 public Operation(Operation.Type type, params object[] args)
 {
     this.type = type;
     this.args = args;
 }
Exemplo n.º 6
0
 public PrivateOperation(Operation.Type type, params object[] args)
     : base(type, args)
 {
 }
Exemplo n.º 7
0
 public WriteCommand(Cluster cluster, WritePolicy policy, Key key, Bin[] bins, Operation.Type operation)
 {
     this.policy    = policy;
     this.key       = key;
     this.partition = Partition.Write(cluster, policy, key);
     this.bins      = bins;
     this.operation = operation;
 }
Exemplo n.º 8
0
 public CommonOperation(OperationHandler operation, Operation.Type type, params object[] args)
     : base(type, args)
 {
     this.operation = operation;
 }
Exemplo n.º 9
0
 public void registerOperation(Operation.Type type, Operation.OperationHandler ch)
 {
     operations[(int)type] = ch;
 }
Exemplo n.º 10
0
 public Operation.OperationHandler getOperationHandler(Operation.Type type)
 {
     return(operations[(int)type]);
 }