Module org.elasticsearch.server
Interface DocumentSizeObserver
public interface DocumentSizeObserver
An interface to allow wrapping an XContentParser and observe the events emitted while parsing
A default implementation returns a noop DocumentSizeObserver
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the state gathered during parsingwrapParser
(XContentParser xContentParser) Decorates a provided xContentParser with additional logic (gather some state).
-
Field Details
-
EMPTY_INSTANCE
a default noop implementation
-
-
Method Details
-
wrapParser
Decorates a provided xContentParser with additional logic (gather some state).- Parameters:
xContentParser
- to be decorated- Returns:
- a decorator xContentParser
-
normalisedBytesParsed
long normalisedBytesParsed()Returns the state gathered during parsing- Returns:
- a number representing a state parsed
-