public override void Read(IDecoder dec)
 {
     packing_flags = (int)dec.ReadUint16();
     if ((packing_flags & 256) != 0)
     {
         _Xid = (Xid)dec.ReadStruct(Xid.TYPE);
     }
 }
        public DtxPrepare(Xid Xid, params Option[] options)
        {
            SetXid(Xid);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
示例#3
0
        public DtxCommit(Xid Xid, params Option[] options)
        {
            SetXid(Xid);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.ONE_PHASE: packing_flags |= 512; break;

                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
示例#4
0
 public void DtxSetTimeout(Xid Xid, long Timeout, params Option[] options)
 {
     Invoke(new DtxSetTimeout(Xid, Timeout, options));
 }
示例#5
0
 public IFuture DtxRollback(Xid Xid, params Option[] options)
 {
     return(Invoke(new DtxRollback(Xid, options), new ResultFuture()));
 }
示例#6
0
 public IFuture DtxGetTimeout(Xid Xid, params Option[] options)
 {
     return(Invoke(new DtxGetTimeout(Xid, options), new ResultFuture()));
 }
示例#7
0
 public void DtxForget(Xid Xid, params Option[] options)
 {
     Invoke(new DtxForget(Xid, options));
 }