Module org.elasticsearch.xcore
Class LocalDateTimeLegacyWrapper
java.lang.Object
org.elasticsearch.xpack.core.scheduler.LocalDateTimeLegacyWrapper
This class is designed to wrap the LocalDateTime class in order to make it behave, in terms of mutation, like a legacy Calendar class.
This is to provide compatibility with the existing Cron next runtime calculation algorithm which relies on certain quirks of the Calendar
such as days of the week being numbered starting on Sunday==1 and being able to set the current hour to 24 and have it roll over to
midnight the next day.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintgetHour()intintgetMonth()intintgetYear()booleanisAfter(ChronoLocalDateTime<?> other) booleanisBefore(ChronoLocalDateTime<?> other) voidplusSeconds(long seconds) voidplusYears(long years) voidsetDayOfMonth(int dayOfMonth) voidsetHour(int hour) voidsetMinute(int minute) voidsetMonth(int month) voidsetSecond(int second) voidsetYear(int year)
-
Constructor Details
-
LocalDateTimeLegacyWrapper
-
-
Method Details
-
getYear
public int getYear() -
getDayOfMonth
public int getDayOfMonth() -
getHour
public int getHour() -
getMinute
public int getMinute() -
getSecond
public int getSecond() -
getDayOfWeek
public int getDayOfWeek() -
getMonth
public int getMonth() -
setYear
public void setYear(int year) -
setDayOfMonth
public void setDayOfMonth(int dayOfMonth) -
setMonth
public void setMonth(int month) -
setHour
public void setHour(int hour) -
setMinute
public void setMinute(int minute) -
setSecond
public void setSecond(int second) -
plusYears
public void plusYears(long years) -
plusSeconds
public void plusSeconds(long seconds) -
isAfter
-
isBefore
-
getLocalDateTime
-