예제 #1
0
 public _IRunnable_121(EventRegistryImpl _enclosing, Transaction transaction, CallbackObjectInfoCollections
                       objectInfoCollections)
 {
     this._enclosing            = _enclosing;
     this.transaction           = transaction;
     this.objectInfoCollections = objectInfoCollections;
 }
예제 #2
0
 public _IRunnable_111(MCommittedInfo _enclosing, CallbackObjectInfoCollections callbackInfos
                       , int dispatcherID)
 {
     this._enclosing    = _enclosing;
     this.callbackInfos = callbackInfos;
     this.dispatcherID  = dispatcherID;
 }
예제 #3
0
 public _IRunnable_132(EventRegistryImpl _enclosing, Transaction transaction, CallbackObjectInfoCollections
                       objectInfoCollections, bool isOwnCommit)
 {
     this._enclosing            = _enclosing;
     this.transaction           = transaction;
     this.objectInfoCollections = objectInfoCollections;
     this.isOwnCommit           = isOwnCommit;
 }
예제 #4
0
 public virtual void CommitOnCompleted(Transaction transaction, CallbackObjectInfoCollections
                                       objectInfoCollections, bool isOwnCommit)
 {
     if (!(_committed != null))
     {
         return;
     }
     WithExceptionHandlingInCallback(new _IRunnable_134(this, transaction, objectInfoCollections
                                                        , isOwnCommit));
 }
예제 #5
0
        public virtual bool ProcessAtClient()
        {
            ByteArrayInputStream @is = new ByteArrayInputStream(_payLoad._buffer);
            int dispatcherID         = PrimitiveCodec.ReadInt(@is);
            CallbackObjectInfoCollections callbackInfos = Decode(@is);

            Container().ThreadPool().Start(ReflectPlatform.SimpleName(GetType()) + ": calling commit callbacks thread"
                                           , new _IRunnable_111(this, callbackInfos, dispatcherID));
            return(true);
        }
예제 #6
0
 public virtual void CommitOnStarted(Transaction transaction, CallbackObjectInfoCollections
                                     objectInfoCollections)
 {
     if (!(_committing != null))
     {
         return;
     }
     WithExceptionHandlingInCallback(new _IRunnable_123(this, transaction, objectInfoCollections
                                                        ));
 }
예제 #7
0
 private byte[] EncodeInfo(CallbackObjectInfoCollections callbackInfo, ByteArrayOutputStream
                           os)
 {
     EncodeObjectInfoCollection(os, callbackInfo.added, new MCommittedInfo.InternalIDEncoder
                                    (this));
     EncodeObjectInfoCollection(os, callbackInfo.deleted, new MCommittedInfo.FrozenObjectInfoEncoder
                                    (this));
     EncodeObjectInfoCollection(os, callbackInfo.updated, new MCommittedInfo.InternalIDEncoder
                                    (this));
     return(os.ToByteArray());
 }
예제 #8
0
        public virtual Msg ReplyFromServer()
        {
            IServerMessageDispatcher dispatcher = ServerMessageDispatcher();

            lock (ContainerLock())
            {
                ServerTransaction().Commit(dispatcher);
                committedInfo = dispatcher.CommittedInfo();
            }
            return(Msg.Ok);
        }
예제 #9
0
 private void AddCommittedInfoMsg(CallbackObjectInfoCollections committedInfo, LocalTransaction
                                  serverTransaction)
 {
     lock (ContainerLock())
     {
         Msg.CommittedInfo.SetTransaction(serverTransaction);
         MCommittedInfo message = Msg.CommittedInfo.Encode(committedInfo, ServerMessageDispatcher
                                                               ().DispatcherID());
         message.SetMessageDispatcher(ServerMessageDispatcher());
         ServerMessageDispatcher().Server().AddCommittedInfoMsg(message);
     }
 }
예제 #10
0
        public virtual MCommittedInfo Encode(CallbackObjectInfoCollections callbackInfo,
                                             int dispatcherID)
        {
            ByteArrayOutputStream os = new ByteArrayOutputStream();

            PrimitiveCodec.WriteInt(os, dispatcherID);
            byte[]         bytes         = EncodeInfo(callbackInfo, os);
            MCommittedInfo committedInfo = (MCommittedInfo)GetWriterForLength(Transaction(),
                                                                              bytes.Length + Const4.IntLength);

            committedInfo._payLoad.Append(bytes);
            return(committedInfo);
        }
 public void DispatchCommitted(CallbackObjectInfoCollections committedInfo)
 {
     _committedInfo = committedInfo;
 }
예제 #12
0
 public CommitEventArgs(Transaction transaction, CallbackObjectInfoCollections collections
                        , bool isOwnCommit) : base(transaction)
 {
     _collections = collections;
     _isOwnCommit = isOwnCommit;
 }
예제 #13
0
 public virtual void CommitOnCompleted(Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections, bool isOwnCommit)
 {
     if (!(_committed != null))
     {
         return;
     }
     WithExceptionHandlingInCallback(new _IRunnable_132(this, transaction, objectInfoCollections
         , isOwnCommit));
 }
예제 #14
0
 public virtual void CommitOnStarted(Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections)
 {
 }
예제 #15
0
 public virtual void CommitOnCompleted(Transaction transaction, CallbackObjectInfoCollections
                                       objectInfoCollections, bool isOwnCommit)
 {
 }
예제 #16
0
 public virtual void CommitOnStarted(Transaction transaction, CallbackObjectInfoCollections
                                     objectInfoCollections)
 {
 }
예제 #17
0
 public _IRunnable_121(EventRegistryImpl _enclosing, Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections)
 {
     this._enclosing = _enclosing;
     this.transaction = transaction;
     this.objectInfoCollections = objectInfoCollections;
 }
예제 #18
0
 public _IRunnable_132(EventRegistryImpl _enclosing, Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections, bool isOwnCommit)
 {
     this._enclosing = _enclosing;
     this.transaction = transaction;
     this.objectInfoCollections = objectInfoCollections;
     this.isOwnCommit = isOwnCommit;
 }
예제 #19
0
 public virtual void CommitOnCompleted(Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections, bool isOwnCommit)
 {
 }
예제 #20
0
 public virtual void CommitOnStarted(Transaction transaction, CallbackObjectInfoCollections
     objectInfoCollections)
 {
     if (!(_committing != null))
     {
         return;
     }
     WithExceptionHandlingInCallback(new _IRunnable_121(this, transaction, objectInfoCollections
         ));
 }