Class IndexNameFormatter


  • public abstract class IndexNameFormatter
    extends java.lang.Object
    • Constructor Detail

      • IndexNameFormatter

        public IndexNameFormatter()
    • Method Detail

      • index

        public abstract java.lang.String index()
      • formatTypeAndRange

        public java.util.List<java.lang.String> formatTypeAndRange​(@Nullable
                                                                   java.lang.String type,
                                                                   long beginMillis,
                                                                   long endMillis)
        Returns a set of index patterns that represent the range provided. Notably, this compresses months or years using wildcards (in order to send smaller API calls).

        For example, if beginMillis is 2016-11-30 and endMillis is 2017-01-02, the result will be 2016-11-30, 2016-12-*, 2017-01-01 and 2017-01-02.

      • formatTypeAndTimestamp

        public java.lang.String formatTypeAndTimestamp​(@Nullable
                                                       java.lang.String type,
                                                       long timestampMillis)
      • parseDate

        public long parseDate​(java.lang.String timestamp)
      • formatType

        public java.lang.String formatType​(@Nullable
                                           java.lang.String type)