Esempio n. 1
0
        /// <summary>
        /// Will recieve local operations from local DatabaseStateTransferManager class
        /// </summary>
        /// <param name="operation"></param>
        /// <returns></returns>
        public object OnOperationRecieved(IStateTransferOperation operation)
        {
            String dbName = operation.TaskIdentity.DBName;

            if (!String.IsNullOrEmpty(dbName) && _databases.ContainsKey(dbName))
            {
                IStateTxfrOperationListener dbStore = _databases[dbName] as IStateTxfrOperationListener;
                if (dbStore != null)
                {
                    return(dbStore.OnOperationRecieved(operation));
                }
            }
            return(null);
        }
Esempio n. 2
0
        public object OnOperationRecieved(IStateTransferOperation operation)
        {
            lock (dbStateTxferMgrMap)
            {
                if (!dbStateTxferMgrMap.ContainsKey(operation.TaskIdentity.DBName))
                {
                    dbStateTxferMgrMap[operation.TaskIdentity.DBName] = new DatabaseStateTransferManager(context, operation.TaskIdentity.DBName, this, _resourceManager);
                }
            }

            IStateTxfrOperationListener task = dbStateTxferMgrMap[operation.TaskIdentity.DBName];

            if (task != null)
            {
                return(task.OnOperationRecieved(operation));
            }

            return(null);
        }