Class RevisionSnapshotFilter
java.lang.Object
org.axonframework.eventsourcing.snapshotting.RevisionSnapshotFilter
- All Implemented Interfaces:
Predicate<DomainEventData<?>>,SnapshotFilter
A
SnapshotFilter implementation which based on a configurable allowed revision will only SnapshotFilter.allow(DomainEventData) DomainEventData containing that revision. True will also be returned if the DomainEventData.getType() does not match the given type, as in compliance with the SnapshotFilter
documentation.- Since:
- 4.5
- Author:
- Steven van Beelen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aRevisionSnapshotFilter. -
Constructor Summary
ConstructorsModifierConstructorDescriptionRevisionSnapshotFilter(String allowedRevision) Deprecated.protectedInstantiate aRevisionSnapshotFilterbased on the fields contained in theRevisionSnapshotFilter.Builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiate a Builder to be able to create aRevisionSnapshotFilter.booleantest(DomainEventData<?> domainEventData) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.eventsourcing.snapshotting.SnapshotFilter
allow, combine
-
Constructor Details
-
RevisionSnapshotFilter
Instantiate aRevisionSnapshotFilterbased on the fields contained in theRevisionSnapshotFilter.Builder.Will assert that the
typeis notnullor an empty String and therevisionis not an empty String and will throw anAxonConfigurationExceptionif this is the case.- Parameters:
builder- theRevisionSnapshotFilter.Builderused to instantiate aRevisionSnapshotFilterinstance
-
RevisionSnapshotFilter
Deprecated.in favor of using theRevisionSnapshotFilter.BuilderConstruct aRevisionSnapshotFilterwhich returnstrueonSnapshotFilter.allow(DomainEventData)invocations where theDomainEventDatacontains the givenrevision.- Parameters:
allowedRevision- the revision which is allowed by thisSnapshotFilter
-
-
Method Details
-
builder
Instantiate a Builder to be able to create aRevisionSnapshotFilter.The
typeis hard requirements and as such should be provided. Therevisionshould not be an empty String- Returns:
- a Builder to be able to create a
RevisionSnapshotFilter
-
test
- Specified by:
testin interfacePredicate<DomainEventData<?>>
-
RevisionSnapshotFilter.Builder