public void Handle(CoreProjectionManagementMessage.GetResult message) { CoreProjection projection; if (_projections.TryGetValue(message.ProjectionId, out projection)) { projection.Handle(message); } }
public void Handle(CoreProjectionManagementMessage.GetResult message) { var command = new GetResultCommand { Id = message.ProjectionId.ToString("N"), CorrelationId = message.CorrelationId.ToString("N"), Partition = message.Partition }; _commandWriter.PublishResponse("$get-result", message.WorkerId, command); }
public void Handle(CoreProjectionManagementMessage.GetResult message) { var state = _stateCache.TryGetPartitionState(message.Partition); var resultString = state != null ? state.Result : null; message.Envelope.ReplyWith( new CoreProjectionManagementMessage.ResultReport( message.CorrelationId, message.CorrelationId, message.Partition, result: resultString, position: null)); }
public void Handle(CoreProjectionManagementMessage.GetResult message) { try { var getResultWorkItem = new GetResultWorkItem( _publisher, message.CorrelationId, message.ProjectionId, this, message.Partition); _processingQueue.EnqueueOutOfOrderTask(getResultWorkItem); ProcessEvent(); } catch (Exception ex) { _publisher.Publish( new CoreProjectionStatusMessage.ResultReport( message.CorrelationId, _projectionCorrelationId, message.Partition, result: null, position: null)); _coreProjection.SetFaulted(ex); } }
public void Handle(CoreProjectionManagementMessage.GetResult message) { if (_state == State.LoadStateRequested || _state == State.StateLoaded || _projectionProcessingPhase == null) { _publisher.Publish( new CoreProjectionStatusMessage.ResultReport( message.CorrelationId, _projectionCorrelationId, message.Partition, result: null, position: null)); return; } EnsureState( State.Running | State.Stopping | State.Stopped | State.FaultedStopping | State.Faulted | State.CompletingPhase | State.PhaseCompleted); _projectionProcessingPhase.Handle(message); }
public void Handle(CoreProjectionManagementMessage.GetResult message) { if (_state == State.LoadStateRequested || _state == State.StateLoaded) { message.Envelope.ReplyWith( new CoreProjectionManagementMessage.ResultReport( message.CorrelationId, _projectionCorrelationId, message.Partition, result: null, position: null, exception: new Exception("Not yet available"))); return; } EnsureState( State.Running | State.Stopping | State.Stopped | State.FaultedStopping | State.Faulted | State.CompletingPhase | State.PhaseCompleted); _projectionProcessingPhase.Handle(message); }
public void Handle(CoreProjectionManagementMessage.GetResult message) { throw new NotImplementedException(); }