|
I help a caller determine how much memory could be consumed by the
input stream while my constraint is in effect.
My constraint will be enforced against the bytes that arrive over the
wire. Eventually I will either accept the incoming bytes and my Unslicer
will provide an object to its parent (including any subobjects), or I
will raise a Violation exception which will kick my Unslicer into
'discard' mode.
I define maxSizeAccept as the maximum number of bytes that will be
received before the stream is accepted as valid. maxSizeReject is the
maximum that will be received before a Violation is raised. The max of
the two provides an upper bound on single objects. For container objects,
the upper bound is probably (n-1)*accept + reject, because there can only
be one outstanding about-to-be-rejected object at any time.
I return (maxSizeAccept, maxSizeReject).
I raise an UnboundedSchema exception if there is no bound.
- Overrides:
Constraint.maxSize
- (inherited documentation)
|