Class LoggingDeprecationHandler
- java.lang.Object
-
- org.elasticsearch.common.xcontent.LoggingDeprecationHandler
-
- All Implemented Interfaces:
DeprecationHandler
public class LoggingDeprecationHandler extends Object implements DeprecationHandler
Logs deprecations to theDeprecationLogger.This is core's primary implementation of
DeprecationHandlerand 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.
-
-
Field Summary
Fields Modifier and Type Field Description static LoggingDeprecationHandlerINSTANCE-
Fields inherited from interface org.elasticsearch.common.xcontent.DeprecationHandler
THROW_UNSUPPORTED_OPERATION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidusedDeprecatedField(String usedName, String replacedWith)Called when the provided field name matches the current field but the entire field has been marked as deprecated.voidusedDeprecatedName(String usedName, String modernName)Called when the provided field name matches a deprecated name for the field.
-
-
-
Field Detail
-
INSTANCE
public static LoggingDeprecationHandler INSTANCE
-
-
Method Detail
-
usedDeprecatedName
public void usedDeprecatedName(String usedName, String modernName)
Description copied from interface:DeprecationHandlerCalled when the provided field name matches a deprecated name for the field.- Specified by:
usedDeprecatedNamein interfaceDeprecationHandler- Parameters:
usedName- the provided field namemodernName- the modern name for the field
-
usedDeprecatedField
public void usedDeprecatedField(String usedName, String replacedWith)
Description copied from interface:DeprecationHandlerCalled when the provided field name matches the current field but the entire field has been marked as deprecated.- Specified by:
usedDeprecatedFieldin interfaceDeprecationHandler- Parameters:
usedName- the provided field namereplacedWith- the name of the field that replaced this field
-
-