public static class RevisionSnapshotFilter.Builder extends Object
RevisionSnapshotFilter
.
The type
and revision
are hard requirements and as such should be provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RevisionSnapshotFilter |
build()
Initializes a
RevisionSnapshotFilter as specified through this Builder. |
RevisionSnapshotFilter.Builder |
revision(String revision)
Sets an aggregate
revision this SnapshotFilter will allow. |
RevisionSnapshotFilter.Builder |
type(Class<?> type)
Sets the aggregate
type this SnapshotFilter will allow using the outcome of Class.getName() on the given type . |
RevisionSnapshotFilter.Builder |
type(String type)
Sets the aggregate
type this SnapshotFilter will allow. |
protected void |
validate()
Validate whether the fields contained in this Builder as set accordingly.
|
public RevisionSnapshotFilter.Builder type(Class<?> type)
type
this SnapshotFilter
will allow using the outcome of Class.getName()
on the given type
. Note that if the type
does not match the DomainEventData.getType()
, the filter will return true
as per the SnapshotFilter
documentation.type
- defines aggregate type this SnapshotFilter
allowspublic RevisionSnapshotFilter.Builder type(String type)
type
this SnapshotFilter
will allow. Note that if the type
does
not match the DomainEventData.getType()
, the filter will return true
as per the SnapshotFilter
documentation.type
- defines aggregate type this SnapshotFilter
allowspublic RevisionSnapshotFilter.Builder revision(String revision)
revision
this SnapshotFilter
will allow.revision
- the aggregatepublic RevisionSnapshotFilter build()
RevisionSnapshotFilter
as specified through this Builder.RevisionSnapshotFilter
as specified through this Builderprotected void validate()
AxonConfigurationException
- if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2024. All rights reserved.