public IGetChunkResponse GetDataChunk(IGetChunkOperation operation) { try { if (Authorize(operation, false)) { return(_nodeContext.TopologyImpl.GetDataChunk(operation)); } return(null); } catch (DatabaseException dbe) { IGetChunkResponse response = operation.CreateResponse() as IGetChunkResponse; response.IsSuccessfull = false; response.ErrorCode = dbe.ErrorCode; response.ErrorParams = dbe.Parameters; response.DataChunk.ReaderUID = operation.ReaderUID; return(response); } catch (Exception e) { if (LoggerManager.Instance.ShardLogger != null && LoggerManager.Instance.ShardLogger.IsErrorEnabled) { LoggerManager.Instance.ShardLogger.Error("Error: DataBaseEngine.GetDataChunk()", e.Message + " StackTrace:" + e.StackTrace); } IGetChunkResponse response = operation.CreateResponse() as IGetChunkResponse; response.IsSuccessfull = false; response.DataChunk.ReaderUID = operation.ReaderUID; return(response); } }
public IGetChunkResponse GetDataChunk(IGetChunkOperation operation) { DatabaseExists(operation.Database); IStore database = _databases[operation.Database]; return(database.GetDataChunk(operation)); }