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 ClassesModifier and TypeClassDescriptionstatic final classDeprecated.private static interfaceDeprecated.private static interfaceDeprecated.private static final classDeprecated.private static final classDeprecated.private static final classDeprecated.private static final classDeprecated.private static final classDeprecated.private static final classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InstantFormatter.FormatterDeprecated.private static final InstantFormatter.FormatterFactory[]Deprecated.The list of formatter factories in decreasing efficiency order.private static final StatusLoggerDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInstantFormatter(InstantFormatter.Builder builder) Deprecated. -
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.private static booleanpatternSupported(String pattern, Locale locale, TimeZone timeZone, InstantFormatter.Formatter formatter) Deprecated.Checks if the provided formatter output matches with the one generated byDateTimeFormatter.
-
Field Details
-
LOGGER
Deprecated. -
FORMATTER_FACTORIES
Deprecated.The list of formatter factories in decreasing efficiency order. -
formatter
Deprecated.
-
-
Constructor Details
-
InstantFormatter
Deprecated.
-
-
Method Details
-
format
Deprecated. -
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. -
patternSupported
private static boolean patternSupported(String pattern, Locale locale, TimeZone timeZone, InstantFormatter.Formatter formatter) Deprecated.Checks if the provided formatter output matches with the one generated byDateTimeFormatter.
-
2.25.0, this class is planned to be removed in the next major release.