コード例 #1
0
        public CommandProcessorSupervisor(IActorRef writer, GlobalOptions options)
        {
            this._writer = writer;
            this._options = options;

            Ready();
        }
コード例 #2
0
        public EventProcessorSupervisor(GlobalOptions options)
        {
            Argument.Requires(options != null, nameof(options));
            _options = options;

            Ready();
        }
コード例 #3
0
        public static Props CreateProps(IProjectionStoreWriter writer, GlobalOptions options)
        {
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<ProjectionCheckpointWriter>(writer, options);
        }
コード例 #4
0
        public static Props CreateProps(IActorRef projectionStreams, GlobalOptions options)
        {
            Argument.RequiresNotNull(projectionStreams, nameof(projectionStreams));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<ProjectionSupervisor>(projectionStreams, options);
        }
コード例 #5
0
        public ProjectionSupervisor(IActorRef projectionStreamSupervisor, GlobalOptions options)
        {
            _projectionStreams = projectionStreamSupervisor;
            _options = options;

            Ready();
        }
コード例 #6
0
ファイル: EventDispatcher.cs プロジェクト: promontis/Even
        public static Props CreateProps(IActorRef reader, GlobalOptions options)
        {
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<EventDispatcher>(reader, options);
        }
コード例 #7
0
        public static Props CreateProps(IActorRef writer, GlobalOptions options)
        {
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<CommandProcessorSupervisor>(writer, options);
        }
コード例 #8
0
ファイル: AggregateSupervisor.cs プロジェクト: promontis/Even
        public AggregateSupervisor(IActorRef reader, IActorRef writer, GlobalOptions options)
        {
            _reader = reader;
            _writer = writer;
            _options = options;

            Ready();
        }
コード例 #9
0
        public ProjectionCheckpointWriter(IProjectionStoreWriter writer, GlobalOptions options)
        {
            _writer = writer;
            _options = options;

            Receive<ProjectionCheckpointPersistenceRequest>(request => Enqueue(request));
            Receive<FlushBufferCommand>(_ => FlushBuffer());
        }
コード例 #10
0
ファイル: AggregateSupervisor.cs プロジェクト: promontis/Even
        public static Props CreateProps(IActorRef reader, IActorRef writer, GlobalOptions options)
        {
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<AggregateSupervisor>(reader, writer, options);
        }
コード例 #11
0
        public static Props CreateProps(IEventStoreWriter writer, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(serializer, nameof(serializer));
            Argument.RequiresNotNull(dispatcher, nameof(dispatcher));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<SerialEventStreamWriter>(writer, serializer, dispatcher, options);
        }
コード例 #12
0
        public SerialEventStreamWriter(IEventStoreWriter writer, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            this._writer = writer;
            this._serializer = serializer;
            this._dispatcher = dispatcher;
            this._options = options;

            Receive<PersistenceRequest>(r => HandleRequest(r));
        }
コード例 #13
0
ファイル: ProjectionStream.cs プロジェクト: mwatts/Even
        public static Props CreateProps(ProjectionStreamQuery query, IActorRef reader, IActorRef writer, GlobalOptions options, Props replayWorkerProps = null)
        {
            Argument.RequiresNotNull(query, nameof(query));
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            return Props.Create<ProjectionStream>(query, reader, writer, options, replayWorkerProps);
        }
コード例 #14
0
ファイル: EventStoreWriter.cs プロジェクト: promontis/Even
        // test only
        public EventStoreWriter(IActorRef serialWriter, IActorRef bufferedWriter, IActorRef indexWriter, IActorRef checkpointWriter, GlobalOptions options)
        {
            _serialWriter = serialWriter;
            _bufferedWriter = bufferedWriter;
            _indexWriter = indexWriter;
            _checkpointWriter = checkpointWriter;

            Ready();
        }
コード例 #15
0
ファイル: EventStoreReader.cs プロジェクト: promontis/Even
        // test only
        public EventStoreReader(Props readProps, Props readStreamProps, Props readIndexedProjectionProps, Props readProjectionCheckpointProps, Props readHighestGlobalSequenceProps, GlobalOptions options)
        {
            _readProps = readProps;
            _readStreamProps = readStreamProps;
            _readIndexedProjectionProps = readIndexedProjectionProps;
            _readProjectionCheckpointProps = readProjectionCheckpointProps;
            _readHighestGlobalSequenceProps = readHighestGlobalSequenceProps;

            Ready();
        }
コード例 #16
0
ファイル: CommandProcessor.cs プロジェクト: promontis/Even
        private void Uninitialized()
        {
            Receive<InitializeCommandProcessor>(ini =>
            {
                _writer = ini.Writer;
                _options = ini.Options;

                Become(Ready);
            });
        }
コード例 #17
0
ファイル: EventStoreReader.cs プロジェクト: promontis/Even
        public EventStoreReader(IEventStore store, IPersistedEventFactory factory, GlobalOptions options)
        {
            _readProps = ReadWorker.CreateProps(store, factory);
            _readStreamProps = ReadStreamWorker.CreateProps(store, factory);
            _readIndexedProjectionProps = ReadIndexedProjectionStreamWorker.CreateProps(store, factory);
            _readProjectionCheckpointProps = ReadProjectionCheckpointWorker.CreateProps(store);
            _readHighestGlobalSequenceProps = ReadHighestGlobalSequenceWorker.CreateProps(store);

            Ready();
        }
コード例 #18
0
ファイル: BufferedEventWriter.cs プロジェクト: promontis/Even
        public BufferedEventWriter(IEventStoreWriter writer, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            _writer = writer;
            _serializer = serializer;
            _dispatcher = dispatcher;
            _options = options;

            Receive<PersistenceRequest>(r => Enqueue(r));
            Receive<FlushBufferCommand>(_ => FlushBuffer());
        }
コード例 #19
0
ファイル: EvenMaster.cs プロジェクト: promontis/Even
        public EvenStartInfo(IEventStore store, ISerializer serializer, GlobalOptions options)
        {
            Argument.RequiresNotNull(store, nameof(store));
            Argument.RequiresNotNull(serializer, nameof(serializer));
            Argument.RequiresNotNull(options, nameof(options));

            Store = store;
            Serializer = serializer;
            Options = options;
        }
コード例 #20
0
ファイル: EventDispatcher.cs プロジェクト: promontis/Even
        public EventDispatcher(IActorRef reader, GlobalOptions options)
        {
            _reader = reader;
            _options = options;

            var request = new ReadHighestGlobalSequenceRequest();
            _reader.Tell(request);
            _requestId = request.RequestID;

            AwaitingGlobalSequence();
        }
コード例 #21
0
        public ProjectionStreamSupervisor(IActorRef reader, IActorRef writer, GlobalOptions options)
        {
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            _reader = reader;
            _writer = writer;
            _options = options;

            Become(ReceivingRequests);
        }
コード例 #22
0
ファイル: EventStoreWriter.cs プロジェクト: promontis/Even
        public EventStoreWriter(IEventStore store, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            var serialProps = SerialEventStreamWriter.CreateProps(store, serializer, dispatcher, options);
            _serialWriter = Context.ActorOf(serialProps, "serial");

            var bufferedProps = BufferedEventWriter.CreateProps(store, serializer, dispatcher, options);
            _bufferedWriter = Context.ActorOf(bufferedProps, "buffered");

            var indexWriterProps = ProjectionIndexWriter.CreateProps(store, options);
            _indexWriter = Context.ActorOf(indexWriterProps, "index");

            var checkpointWriterProps = ProjectionCheckpointWriter.CreateProps(store, options);
            _checkpointWriter = Context.ActorOf(checkpointWriterProps, "checkpoint");

            Ready();
        }
コード例 #23
0
ファイル: ProjectionStream.cs プロジェクト: mwatts/Even
        public ProjectionStream(ProjectionStreamQuery query, IActorRef reader, IActorRef writer, GlobalOptions options, Props replayWorkerProps)
        {
            _query = query;
            _reader = reader;
            _writer = writer;
            _options = options;
            _replayWorkerProps = replayWorkerProps ?? Props.Create<ProjectionReplayWorker>();

            // subscribe to events in the stream
            Context.System.EventStream.Subscribe(Self, typeof(IPersistedEvent));

            // request checkpoint
            var request = new ReadProjectionCheckpointRequest(_query.ProjectionStream);
            _lastRequestId = request.RequestID;
            _reader.Tell(request);

            Become(AwaitingCheckpoint);
        }
コード例 #24
0
 public static Props CreateProps(IEventStore store, IPersistedEventFactory factory, GlobalOptions options)
 {
     return(Props.Create <EventStoreReader>(store, factory, options));
 }
コード例 #25
0
        public InitializeProjectionReplayWorker(IActorRef reader, IActorRef subscriber, ProjectionSubscriptionRequest subscriptionRequest, int lastSequenceToRead, GlobalOptions options)
        {
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(subscriber, nameof(subscriber));
            Argument.RequiresNotNull(subscriptionRequest, nameof(subscriptionRequest));
            Argument.RequiresNotNull(options, nameof(options));

            this.Reader              = reader;
            this.Subscriber          = subscriber;
            this.SubscriptionRequest = subscriptionRequest;
            this.LastSequenceToRead  = lastSequenceToRead;
            this.Options             = options;
        }
コード例 #26
0
        public ProjectionStream(ProjectionStreamQuery query, IActorRef reader, IActorRef writer, GlobalOptions options, Props replayWorkerProps)
        {
            _query             = query;
            _reader            = reader;
            _writer            = writer;
            _options           = options;
            _replayWorkerProps = replayWorkerProps ?? Props.Create <ProjectionReplayWorker>();

            // subscribe to events in the stream
            Context.System.EventStream.Subscribe(Self, typeof(IPersistedEvent));

            // request checkpoint
            var request = new ReadProjectionCheckpointRequest(_query.ProjectionStream);

            _lastRequestId = request.RequestID;
            _reader.Tell(request);

            Become(AwaitingCheckpoint);
        }
コード例 #27
0
 public static Props CreateProps(IActorRef reader, IActorRef writer, GlobalOptions options)
 {
     return Props.Create<ProjectionStreamSupervisor>(reader, writer, options);
 }
コード例 #28
0
        // test only
        public EventStoreWriter(IActorRef serialWriter, IActorRef bufferedWriter, IActorRef indexWriter, IActorRef checkpointWriter, GlobalOptions options)
        {
            _serialWriter     = serialWriter;
            _bufferedWriter   = bufferedWriter;
            _indexWriter      = indexWriter;
            _checkpointWriter = checkpointWriter;

            Ready();
        }
コード例 #29
0
ファイル: EventStoreWriter.cs プロジェクト: promontis/Even
 // test only
 public static Props CreateProps(IActorRef serial, IActorRef buffered, IActorRef indexWriter, IActorRef checkpointWriter, GlobalOptions options)
 {
     return Props.Create<EventStoreWriter>(serial, buffered, indexWriter, checkpointWriter, options);
 }
コード例 #30
0
        public EventStoreWriter(IEventStore store, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            var serialProps = SerialEventStreamWriter.CreateProps(store, serializer, dispatcher, options);

            _serialWriter = Context.ActorOf(serialProps, "serial");

            var bufferedProps = BufferedEventWriter.CreateProps(store, serializer, dispatcher, options);

            _bufferedWriter = Context.ActorOf(bufferedProps, "buffered");

            var indexWriterProps = ProjectionIndexWriter.CreateProps(store, options);

            _indexWriter = Context.ActorOf(indexWriterProps, "index");

            var checkpointWriterProps = ProjectionCheckpointWriter.CreateProps(store, options);

            _checkpointWriter = Context.ActorOf(checkpointWriterProps, "checkpoint");

            Ready();
        }
コード例 #31
0
ファイル: EventStoreReader.cs プロジェクト: promontis/Even
 // test only
 public static Props CreateProps(Props readProps, Props readStreamProps, Props readIndexedProjectionProps, Props readProjectionCheckpointProps, Props readHighestGlobalSequenceProps, GlobalOptions options)
 {
     return Props.Create<EventStoreReader>(readProps, readStreamProps, readIndexedProjectionProps, readProjectionCheckpointProps, readHighestGlobalSequenceProps, options);
 }
コード例 #32
0
ファイル: EventStoreReader.cs プロジェクト: promontis/Even
 public static Props CreateProps(IEventStore store, IPersistedEventFactory factory, GlobalOptions options)
 {
     return Props.Create<EventStoreReader>(store, factory, options);
 }
コード例 #33
0
        // test only
        public EventStoreReader(Props readProps, Props readStreamProps, Props readIndexedProjectionProps, Props readProjectionCheckpointProps, Props readHighestGlobalSequenceProps, GlobalOptions options)
        {
            _readProps                      = readProps;
            _readStreamProps                = readStreamProps;
            _readIndexedProjectionProps     = readIndexedProjectionProps;
            _readProjectionCheckpointProps  = readProjectionCheckpointProps;
            _readHighestGlobalSequenceProps = readHighestGlobalSequenceProps;

            Ready();
        }
コード例 #34
0
 // test only
 public static Props CreateProps(IActorRef serial, IActorRef buffered, IActorRef indexWriter, IActorRef checkpointWriter, GlobalOptions options)
 {
     return(Props.Create <EventStoreWriter>(serial, buffered, indexWriter, checkpointWriter, options));
 }
コード例 #35
0
ファイル: ProjectionStream.cs プロジェクト: mwatts/Even
        public InitializeProjectionReplayWorker(IActorRef reader, IActorRef subscriber, ProjectionSubscriptionRequest subscriptionRequest, int lastSequenceToRead, GlobalOptions options)
        {
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(subscriber, nameof(subscriber));
            Argument.RequiresNotNull(subscriptionRequest, nameof(subscriptionRequest));
            Argument.RequiresNotNull(options, nameof(options));

            this.Reader = reader;
            this.Subscriber = subscriber;
            this.SubscriptionRequest = subscriptionRequest;
            this.LastSequenceToRead = lastSequenceToRead;
            this.Options = options;
        }
コード例 #36
0
 public static Props CreateProps(IActorRef reader, IActorRef writer, GlobalOptions options)
 {
     return(Props.Create <ProjectionStreamSupervisor>(reader, writer, options));
 }
コード例 #37
0
ファイル: ProjectionStream.cs プロジェクト: mwatts/Even
        public ProjectionReplayWorker()
        {
            Receive<InitializeProjectionReplayWorker>(ini =>
            {
                _reader = ini.Reader;
                _subscriber = ini.Subscriber;
                _lastSequenceToRead = ini.LastSequenceToRead;
                _options = ini.Options;

                _subscriberRequestId = ini.SubscriptionRequest.RequestID;
                _projectionStream = ini.SubscriptionRequest.Query.ProjectionStream;
                _currentSequence = ini.SubscriptionRequest.LastKnownSequence;

                StartReadRequest();
                Become(Replaying);
            });
        }
コード例 #38
0
 // test only
 public static Props CreateProps(Props readProps, Props readStreamProps, Props readIndexedProjectionProps, Props readProjectionCheckpointProps, Props readHighestGlobalSequenceProps, GlobalOptions options)
 {
     return(Props.Create <EventStoreReader>(readProps, readStreamProps, readIndexedProjectionProps, readProjectionCheckpointProps, readHighestGlobalSequenceProps, options));
 }
コード例 #39
0
        public static Props CreateProps(ProjectionStreamQuery query, IActorRef reader, IActorRef writer, GlobalOptions options, Props replayWorkerProps = null)
        {
            Argument.RequiresNotNull(query, nameof(query));
            Argument.RequiresNotNull(reader, nameof(reader));
            Argument.RequiresNotNull(writer, nameof(writer));
            Argument.RequiresNotNull(options, nameof(options));

            return(Props.Create <ProjectionStream>(query, reader, writer, options, replayWorkerProps));
        }
コード例 #40
0
 public static Props CreateProps(GlobalOptions options)
 {
     return Props.Create<EventProcessorSupervisor>(options);
 }
コード例 #41
0
        public static Props CreateProps(IEventStore store, ISerializer serializer, IActorRef dispatcher, GlobalOptions options)
        {
            Argument.RequiresNotNull(store, nameof(store));
            Argument.RequiresNotNull(serializer, nameof(serializer));
            Argument.RequiresNotNull(dispatcher, nameof(dispatcher));
            Argument.RequiresNotNull(options, nameof(options));

            return(Props.Create <EventStoreWriter>(store, serializer, dispatcher, options));
        }