コード例 #1
0
        private void HandleReplicationHelperEvent(IEventData eventData)
        {
            var finishEvent = new ReplicationHelperEvent(this.Protocol, eventData);

            if (finishEvent.IsValid == false)
            {
                string msg = finishEvent.GetErrorMessage();
                log.ErrorFormat("UpdateExpectedGamesCount contract error: {0}", msg);
                return;
            }

            var ctx = this.Context;

            if (ctx != null)
            {
                ctx.HandleReplicationHelperEvent(finishEvent);
            }
        }
コード例 #2
0
        public void HandleReplicationHelperEvent(ReplicationHelperEvent replicationHelperEvent)
        {
            if (log.IsDebugEnabled)
            {
                log.DebugFormat("Handling of ReplicationHelperEvent event. replicated count:{0},expected count:{1}. context:{2}",
                                this.countOfUpdates, replicationHelperEvent.ExpectedGamesCount, this.gameServerContext);
            }

            if (this.countOfUpdates == -1)
            {
                //we forcibly finished replication
                log.WarnFormat("Got ReplicationHelperEvent after forcibly closed replication, event count:{0}, context:{1}",
                               replicationHelperEvent.ExpectedGamesCount, this.gameServerContext);
                return;
            }

            this.countOfExpectedUpdates = replicationHelperEvent.ExpectedGamesCount;
            if (this.countOfExpectedUpdates == 0 || this.IsReplicationComplete)
            {
                this.OnReplicationFinished();
            }
        }
コード例 #3
0
 public void HandleReplicationHelperEvent(ReplicationHelperEvent finishEvent)
 {
     this.replicationAssistant.HandleReplicationHelperEvent(finishEvent);
 }