Package org.opensearch.common.xcontent
Class LoggingDeprecationHandler
java.lang.Object
org.opensearch.common.xcontent.LoggingDeprecationHandler
- All Implemented Interfaces:
org.opensearch.core.xcontent.DeprecationHandler
public class LoggingDeprecationHandler
extends Object
implements org.opensearch.core.xcontent.DeprecationHandler
Logs deprecations to the
DeprecationLogger
.
This is core's primary implementation of DeprecationHandler
and
should absolutely be used everywhere where it parses
requests. It is much less appropriate when parsing responses from external
sources because it will report deprecated fields back to the user as
though the user sent them.
- Opensearch.internal:
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.DeprecationHandler
IGNORE_DEPRECATIONS, THROW_UNSUPPORTED_OPERATION
-
Method Summary
Modifier and TypeMethodDescriptionvoid
usedDeprecatedField
(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName) void
usedDeprecatedField
(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName, String replacedWith) void
usedDeprecatedName
(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName, String modernName)
-
Field Details
-
INSTANCE
-
-
Method Details
-
usedDeprecatedName
public void usedDeprecatedName(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName, String modernName) - Specified by:
usedDeprecatedName
in interfaceorg.opensearch.core.xcontent.DeprecationHandler
-
usedDeprecatedField
public void usedDeprecatedField(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName, String replacedWith) - Specified by:
usedDeprecatedField
in interfaceorg.opensearch.core.xcontent.DeprecationHandler
-
usedDeprecatedField
public void usedDeprecatedField(String parserName, Supplier<org.opensearch.core.xcontent.XContentLocation> location, String usedName) - Specified by:
usedDeprecatedField
in interfaceorg.opensearch.core.xcontent.DeprecationHandler
-