Class SimpleSegmentNameGenerator

  • All Implemented Interfaces:
    Serializable, SegmentNameGenerator

    public class SimpleSegmentNameGenerator
    extends Object
    implements SegmentNameGenerator
    Simple segment name generator which does not perform time conversion.

    The segment name is simply joining the following fields with '_' but ignoring all the nulls.

    • Table name
    • Minimum time value
    • Maximum time value
    • Segment name postfix
    • Sequence id
    See Also:
    Serialized Form
    • Constructor Detail

      • SimpleSegmentNameGenerator

        public SimpleSegmentNameGenerator​(String segmentNamePrefix,
                                          @Nullable
                                          String segmentNamePostfix)
      • SimpleSegmentNameGenerator

        public SimpleSegmentNameGenerator​(String segmentNamePrefix,
                                          @Nullable
                                          String segmentNamePostfix,
                                          boolean appendUUIDToSegmentName)
    • Method Detail

      • generateSegmentName

        public String generateSegmentName​(int sequenceId,
                                          @Nullable
                                          Object minTimeValue,
                                          @Nullable
                                          Object maxTimeValue)
        Description copied from interface: SegmentNameGenerator
        Generates the segment name.
        Specified by:
        generateSegmentName in interface SegmentNameGenerator
        Parameters:
        sequenceId - Segment sequence id (negative value means INVALID)
        minTimeValue - Minimum time value
        maxTimeValue - Maximum time value
        Returns:
        Segment name generated