Class InstantPatternLegacyFormatter
java.lang.Object
org.apache.logging.log4j.core.util.internal.instant.InstantPatternLegacyFormatter
- All Implemented Interfaces:
InstantFormatter,InstantPatternFormatter
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.util.internal.instant.InstantPatternFormatter
InstantPatternFormatter.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiConsumer<StringBuilder, Instant> private final Localeprivate final Stringprivate final ChronoUnitprivate final TimeZoneFields inherited from interface org.apache.logging.log4j.core.util.internal.instant.InstantPatternFormatter
LEGACY_FORMATTERS_ENABLED -
Constructor Summary
ConstructorsConstructorDescriptionInstantPatternLegacyFormatter(String pattern, Locale locale, TimeZone timeZone) -
Method Summary
Modifier and TypeMethodDescriptionprivate static BiConsumer<StringBuilder, Instant> adaptFixedFormatter(FixedDateFormat formatter) private static BiConsumer<StringBuilder, Instant> createFastFormatter(String pattern, Locale locale, TimeZone timeZone) private static BiConsumer<StringBuilder, Instant> createFormatter(String pattern, Locale locale, TimeZone timeZone) voidformatTo(StringBuilder buffer, Instant instant) private static <V> Supplier<V> memoryEfficientInstanceSupplier(Supplier<V> supplier) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.util.internal.instant.InstantFormatter
format
-
Field Details
-
precision
-
pattern
-
locale
-
timeZone
-
formatter
-
-
Constructor Details
-
InstantPatternLegacyFormatter
-
-
Method Details
-
createFormatter
private static BiConsumer<StringBuilder,Instant> createFormatter(String pattern, Locale locale, TimeZone timeZone) -
adaptFixedFormatter
-
createFastFormatter
private static BiConsumer<StringBuilder,Instant> createFastFormatter(String pattern, Locale locale, TimeZone timeZone) -
memoryEfficientInstanceSupplier
-
getPrecision
- Specified by:
getPrecisionin interfaceInstantFormatter- Returns:
- the time precision of the formatted output
-
formatTo
- Specified by:
formatToin interfaceInstantFormatter
-
getPattern
- Specified by:
getPatternin interfaceInstantPatternFormatter
-
getLocale
- Specified by:
getLocalein interfaceInstantPatternFormatter
-
getTimeZone
- Specified by:
getTimeZonein interfaceInstantPatternFormatter
-