Class InstantFormatter
java.lang.Object
org.apache.logging.log4j.layout.template.json.util.InstantFormatter
Deprecated.
A composite
Instant formatter trying to employ either
FixedDateFormat, FastDateFormat, or DateTimeFormatter
in the given order due to performance reasons.
Note that FixedDateFormat and FastDateFormat only support
millisecond precision. If the pattern asks for a higher precision,
DateTimeFormatter will be employed, which is significantly slower.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.voidformat(Instant instant, StringBuilder stringBuilder) Deprecated.Class<?> Deprecated.booleanisInstantMatching(Instant instant1, Instant instant2) Deprecated.Checks if the givenInstants are equal from the point of view of the employed formatter.static InstantFormatter.BuilderDeprecated.
-
Method Details
-
format
-
format
Deprecated. -
isInstantMatching
Deprecated.Checks if the givenInstants are equal from the point of view of the employed formatter.This method should be preferred over
. For instance,invalid reference
Instant#equals(Object)FixedDateFormatandFastDateFormatdiscard nanoseconds, hence, from their point of view, two differentInstants are equal if they match up to millisecond precision. -
getInternalImplementationClass
Deprecated. -
newBuilder
Deprecated.
-
2.25.0, this class is planned to be removed in the next major release.