Class SnowflakeLocalDateTimeConvertor

java.lang.Object
me.ahoo.cosid.sharding.SnowflakeLocalDateTimeConvertor
All Implemented Interfaces:
LocalDateTimeConvertor

public class SnowflakeLocalDateTimeConvertor extends Object implements LocalDateTimeConvertor
Converts a Snowflake id, a Long or its text, to the time it was issued: Layout.unpack(long) gives the time part (D7; 4.x used a SnowflakeIdStateParser).
  • Field Details

    • RADIX62_PAD_START

      public static final me.ahoo.cosid.codec.IdCodec RADIX62_PAD_START
      The text form of 4.x's Radix62IdConverter.PAD_START: base 62, 11 digits, padded.
  • Constructor Details

    • SnowflakeLocalDateTimeConvertor

      public SnowflakeLocalDateTimeConvertor(me.ahoo.cosid.time.Layout layout, ZoneId zoneId)
      Creates the convertor; text values are base 62, 11 digits, padded.
      Parameters:
      layout - the layout of the ids
      zoneId - the zone of the local date-time
    • SnowflakeLocalDateTimeConvertor

      public SnowflakeLocalDateTimeConvertor(me.ahoo.cosid.time.Layout layout, ZoneId zoneId, me.ahoo.cosid.codec.IdCodec codec)
      Creates the convertor.
      Parameters:
      layout - the layout of the ids
      zoneId - the zone of the local date-time
      codec - decodes text values
  • Method Details