-
Notifications
You must be signed in to change notification settings - Fork 789
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced protected method by use EventStreamLoadingStrategy in favor …
…of making it Spring configurable
- Loading branch information
André Bierwolf
committed
May 29, 2018
1 parent
c621201
commit d4712e0
Showing
8 changed files
with
252 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
.../src/main/java/org/axonframework/eventsourcing/eventstore/EventStreamLoadingStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,37 @@ | |||
/* | |||
* Copyright (c) 2010-2017. Axon Framework | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
|
|||
package org.axonframework.eventsourcing.eventstore; | |||
|
|||
/** | |||
* Provides a mechanism to adjust the way the EventSourcingRepository reads events | |||
* from the EventStore. | |||
* | |||
* @author André Bierwolf | |||
* @since 3.3 | |||
*/ | |||
@FunctionalInterface | |||
public interface EventStreamLoadingStrategy { | |||
|
|||
/** | |||
* Reads the events for the given aggregateIdentifier from the eventStore. | |||
* | |||
* @param aggregateIdentifier the identifier of the aggregate to load | |||
* @param eventStore the EventStore to read from | |||
* @return the domain event stream for the given aggregateIdentifier | |||
*/ | |||
public DomainEventStream readEvents(String aggregateIdentifier, EventStore eventStore); | |||
} |
37 changes: 37 additions & 0 deletions
37
...in/java/org/axonframework/eventsourcing/eventstore/EventStreamLoadingStrategyFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,37 @@ | |||
/* | |||
* Copyright (c) 2010-2017. Axon Framework | |||
* | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | |||
* | |||
* http://www.apache.org/licenses/LICENSE-2.0 | |||
* | |||
* Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
|
|||
package org.axonframework.eventsourcing.eventstore; | |||
|
|||
import org.axonframework.commandhandling.model.inspection.AggregateModel; | |||
|
|||
/** | |||
* Interface describing objects capable of creating instances of EventStreamLoadingStrategy. | |||
* | |||
* @author André Bierwolf | |||
* @since 3.3 | |||
*/ | |||
@FunctionalInterface | |||
public interface EventStreamLoadingStrategyFactory { | |||
|
|||
/** | |||
* Instantiates an EventStreamLoadingStrategy based on the given aggregateModel. | |||
* | |||
* @param aggregateModel the aggregateModel to create the strategy for | |||
* @return the strategy to use for the given aggregateModel | |||
*/ | |||
public EventStreamLoadingStrategy create(AggregateModel<?> aggregateModel); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.