Class RollingCalendar

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Calendar>

    class RollingCalendar
    extends java.util.GregorianCalendar
    RollingCalendar is a helper class to DailyRollingFileAppender. Given a periodicity type and the current time, it computes the start of the next interval.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.Calendar

        java.util.Calendar.Builder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      (package private) int type  
      • Fields inherited from class java.util.GregorianCalendar

        AD, BC
      • Fields inherited from class java.util.Calendar

        ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, LONG_FORMAT, LONG_STANDALONE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NARROW_FORMAT, NARROW_STANDALONE, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SHORT_FORMAT, SHORT_STANDALONE, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getNextCheckDate​(java.util.Date now)  
      long getNextCheckMillis​(java.util.Date now)  
      (package private) void setType​(int type)  
      • Methods inherited from class java.util.GregorianCalendar

        add, clone, computeFields, computeTime, equals, from, getActualMaximum, getActualMinimum, getCalendarType, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, getWeeksInWeekYear, getWeekYear, hashCode, isLeapYear, isWeekDateSupported, roll, roll, setGregorianChange, setTimeZone, setWeekDate, toZonedDateTime
      • Methods inherited from class java.util.Calendar

        after, before, clear, clear, compareTo, complete, get, getAvailableCalendarTypes, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, toInstant, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • type

        int type
    • Constructor Detail

      • RollingCalendar

        RollingCalendar()
      • RollingCalendar

        RollingCalendar​(java.util.TimeZone tz,
                        java.util.Locale locale)
    • Method Detail

      • setType

        void setType​(int type)
      • getNextCheckMillis

        public long getNextCheckMillis​(java.util.Date now)
      • getNextCheckDate

        public java.util.Date getNextCheckDate​(java.util.Date now)