Class XmlEventDecoder.ReceivedByteTracker
java.lang.Object
org.springframework.http.codec.xml.XmlEventDecoder.ReceivedByteTracker
- Enclosing class:
XmlEventDecoder
Callers of
XmlEventDecoder that buffer emitted XML events at a
higher level, can pass an instance of this tracker as an
XmlEventDecoder.BYTE_TRACKER_HINT to monitor the total number of
bytes received, and to reset periodically.
For use with Aalto XML async parsing only, in which case this decoder parses releases each buffer immediately.
- Since:
- 5.0
- Author:
- Arjen Poutsma, Sam Brannen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final XmlEventDecoder.ReceivedByteTrackerAn instance to use when there is no limit. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NO_OP
An instance to use when there is no limit.
-
-
Constructor Details
-
ReceivedByteTracker
public ReceivedByteTracker(int maxInMemorySize)
-
-
Method Details
-
getMaxInMemorySize
public int getMaxInMemorySize() -
isMaxInMemorySizeExceeded
public boolean isMaxInMemorySizeExceeded() -
reset
public void reset() -
toString
-