Class PersistentStreamProperties
- java.lang.Object
-
- io.axoniq.axonserver.connector.event.PersistentStreamProperties
-
public class PersistentStreamProperties extends Object
Defines the properties for a new persistent stream.- Since:
- 2024.0.0
- Author:
- Marc Gathier
-
-
Field Summary
Fields Modifier and Type Field Description static StringHEAD_POSITIONIndicator for setting the initial position of a persistent stream to the head of the event store.static StringTAIL_POSITIONIndicator for setting the initial position of a persistent stream to the tail of the event store.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringfilter()Returns the filter to filter events on Axon Server side.StringinitialPosition()Returns the first token to read.intsegments()Returns the number of segments.StringsequencingPolicyName()Returns the sequencing policy name.List<String>sequencingPolicyParameters()Returns the parameters for the sequencing policy.StringstreamName()Returns the logical name for the persistent stream.
-
-
-
Field Detail
-
HEAD_POSITION
public static final String HEAD_POSITION
Indicator for setting the initial position of a persistent stream to the head of the event store.- See Also:
- Constant Field Values
-
TAIL_POSITION
public static final String TAIL_POSITION
Indicator for setting the initial position of a persistent stream to the tail of the event store.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PersistentStreamProperties
public PersistentStreamProperties(String streamName, int segments, String sequencingPolicyName, List<String> sequencingPolicyParameters, String initialPosition, String filter)
Instantiates the persistent stream properties- Parameters:
streamName- a logical name for the persistent streamsegments- the number of segments, must be larger than 0sequencingPolicyName- the sequencing policy name, must be a name known in Axon ServersequencingPolicyParameters- optional parameters for the sequencing policyinitialPosition- first token to read or HEAD or TAILfilter- an optional filter to filter events on Axon Server side
-
-
Method Detail
-
streamName
public String streamName()
Returns the logical name for the persistent stream.- Returns:
- the logical name for the persistent stream
-
segments
public int segments()
Returns the number of segments.- Returns:
- the number of segments
-
sequencingPolicyName
public String sequencingPolicyName()
Returns the sequencing policy name.- Returns:
- the sequencing policy name
-
sequencingPolicyParameters
public List<String> sequencingPolicyParameters()
Returns the parameters for the sequencing policy.- Returns:
- parameters for the sequencing policy
-
initialPosition
public String initialPosition()
Returns the first token to read.- Returns:
- first token to read
-
filter
public String filter()
Returns the filter to filter events on Axon Server side.- Returns:
- filter to filter events on Axon Server side
-
-