Class PersistentStreamProperties


  • public class PersistentStreamProperties
    extends Object
    Defines the properties for a new persistent stream.
    Since:
    2024.0.0
    Author:
    Marc Gathier
    • 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 stream
        segments - the number of segments, must be larger than 0
        sequencingPolicyName - the sequencing policy name, must be a name known in Axon Server
        sequencingPolicyParameters - optional parameters for the sequencing policy
        initialPosition - first token to read or HEAD or TAIL
        filter - 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