Exemplo n.º 1
0
 public override void Read(IDecoder dec)
 {
     packing_flags = (int)dec.ReadUint16();
     if ((packing_flags & 256) != 0)
     {
         _Xid = (Xid)dec.ReadStruct(Xid.TYPE);
     }
 }
Exemplo n.º 2
0
        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]);
                }
            }
        }
Exemplo n.º 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]);
                }
            }
        }
Exemplo n.º 4
0
 public void DtxSetTimeout(Xid Xid, long Timeout, params Option[] options)
 {
     Invoke(new DtxSetTimeout(Xid, Timeout, options));
 }
Exemplo n.º 5
0
 public IFuture DtxRollback(Xid Xid, params Option[] options)
 {
     return(Invoke(new DtxRollback(Xid, options), new ResultFuture()));
 }
Exemplo n.º 6
0
 public IFuture DtxGetTimeout(Xid Xid, params Option[] options)
 {
     return(Invoke(new DtxGetTimeout(Xid, options), new ResultFuture()));
 }
Exemplo n.º 7
0
 public void DtxForget(Xid Xid, params Option[] options)
 {
     Invoke(new DtxForget(Xid, options));
 }