/// <summary> /// Handle Transfer Bucket, Actually transfer bucket data to requesting node/shard /// </summary> /// <param name="operation"></param> /// <returns></returns> private object HandleTransferBucketKeys(IStateTransferOperation operation) { ICorresponder corrosponder = null; lock (collectionCorresponderMap) { //if (!collectionCorresponderMap.ContainsKey(operation.TaskIdentity)) //{ // if (LoggerManager.Instance.StateXferLogger.IsDebugEnabled) // LoggerManager.Instance.StateXferLogger.Debug("DatabaseStateTransferManager.HandleTransferBucketKeys","Creating StateTxferCorrosponder for :"+operation.TaskIdentity.ToString()); // collectionCorresponderMap[operation.TaskIdentity] = new StateTxfrCorresponder(context, this, operation.TaskIdentity);//.DBName, operation.TaskIdentity.ColName, operation.TaskIdentity.NodeInfo, operation.TaskIdentity.Type); //} corrosponder = collectionCorresponderMap[operation.TaskIdentity]; } if (corrosponder == null) { Exception ex = new StateTransferException("No corrosponder found for :" + operation.TaskIdentity.ToString()); if (LoggerManager.Instance.StateXferLogger.IsErrorEnabled) { LoggerManager.Instance.StateXferLogger.Error("DatabaseStateTransferManager.HandleTransferBucketKeys", ex); } return(ex); } return(corrosponder.GetBucketKeys(operation.Params)); }
/// <summary> /// Handle Transfer Bucket, Actually transfer bucket data to requesting node/shard /// </summary> /// <param name="operation"></param> /// <returns></returns> private object HandleTransferBucketData(IStateTransferOperation operation) { ICorresponder corrosponder = null; lock (collectionCorresponderMap) { if (collectionCorresponderMap.ContainsKey(operation.TaskIdentity)) { corrosponder = collectionCorresponderMap[operation.TaskIdentity]; } } if (corrosponder == null) { Exception ex = new StateTransferException("No corrosponder found for :" + operation.TaskIdentity.ToString()); if (LoggerManager.Instance.StateXferLogger.IsErrorEnabled) { LoggerManager.Instance.StateXferLogger.Error("DatabaseStateTransferManager.HandleTransferBucketData", ex); } return(ex); } return(corrosponder.GetBucketData(operation.Params)); }