public override string GetStatePartition(EventReaderSubscriptionMessage.CommittedEventReceived @event)
 {
     return _handler.GetStatePartition(
         @event.CheckpointTag, @event.Data.EventStreamId, @event.Data.EventType, @event.EventCategory,
         @event.Data.EventId, @event.Data.EventSequenceNumber, @event.Data.Metadata,
         @event.Data.Data);
 }
 public CommittedEventWorkItem(
     CoreProjection projection, EventReaderSubscriptionMessage.CommittedEventReceived message,
     StatePartitionSelector statePartitionSelector)
     : base(projection, null)
 {
     _statePartitionSelector = statePartitionSelector;
     _message = message;
 }
 public PartitionDeletedWorkItem(
     IEventProcessingProjectionPhase projection, EventReaderSubscriptionMessage.PartitionDeleted message)
     : base(null)
 {
     _partition = message.Partition;
     _projection = projection;
     _message = message;
     _requiresRunning = true;
 }
 public CheckpointSuggestedWorkItem(
     CoreProjection projection, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base(projection) 
 {
     _projection = projection;
     _message = message;
     _checkpointManager = checkpointManager;
 }
 public CheckpointSuggestedWorkItem(
     IProjectionPhaseCheckpointManager projectionPhase, EventReaderSubscriptionMessage.CheckpointSuggested message,
     ICoreProjectionCheckpointManager checkpointManager)
     : base() 
 {
     _projectionPhase = projectionPhase;
     _message = message;
     _checkpointManager = checkpointManager;
 }
Ejemplo n.º 6
0
 public CommittedEventWorkItem(
     IEventProcessingProjectionPhase projection, EventReaderSubscriptionMessage.CommittedEventReceived message,
     StatePartitionSelector statePartitionSelector)
     : base(null)
 {
     _projection = projection;
     _statePartitionSelector = statePartitionSelector;
     _message = message;
     _requiresRunning = true;
 }
        public override string GetStatePartition(EventReaderSubscriptionMessage.CommittedEventReceived @event)
        {
            if (@event.Data.ResolvedLinkTo && @event.Data.PositionMetadata != null)
            {
                var extra = @event.Data.PositionMetadata.ParseCheckpointExtraJson();
                JToken v;
                if (extra != null && extra.TryGetValue("$o", out v))
                {
                    //TODO: handle exceptions properly
                    var originalStream = (string) ((JValue) v).Value;
                    return originalStream;
                }
            }

            return @event.Data.PositionStreamId;
        }
 public override string GetStatePartition(EventReaderSubscriptionMessage.CommittedEventReceived @event)
 {
     return "";
 }
Ejemplo n.º 9
0
 public abstract string GetStatePartition(EventReaderSubscriptionMessage.CommittedEventReceived @event);
Ejemplo n.º 10
0
 public void Handle(EventReaderSubscriptionMessage.EofReached message)
 {
     _eofReachedMessages.Add(message);
 }
Ejemplo n.º 11
0
 public void Handle(EventReaderSubscriptionMessage.NotAuthorized message)
 {
     _notAuthorizedMessages.Add(message);
 }
Ejemplo n.º 12
0
 public void Handle(EventReaderSubscriptionMessage.ProgressChanged message)
 {
     _progresschangedMessages.Add(message);
 }
Ejemplo n.º 13
0
 public void Handle(EventReaderSubscriptionMessage.CheckpointSuggested message)
 {
     _checkpointSuggestedMessages.Add(message);
 }
Ejemplo n.º 14
0
 public void Handle(EventReaderSubscriptionMessage.CommittedEventReceived message)
 {
     _committedEventReceivedMessages.Add(message);
 }
 public override string GetStatePartition(EventReaderSubscriptionMessage.CommittedEventReceived @event)
 {
     return _handler.GetStatePartition(@event.CheckpointTag, @event.EventCategory, @event.Data);
 }