The ClassifiedRetryFilter uses BufferedStreams to implement retries. The request stream is
buffered and a child stream is sent to the service. This is done so that if it becomes
necessary to retry, a new child of the request stream can be created.
The response stream is also buffered and held until either the response stream completes
or the response buffer becomes full. If the response stream completes, we use the provided
ResponseClassifier to determine if the request should be retried. If so, we discard the
response stream, fork a new child of the request stream, and send the new request stream to
the service. If not, we return the response stream to the caller.
The ClassifiedRetryFilter uses BufferedStreams to implement retries. The request stream is buffered and a child stream is sent to the service. This is done so that if it becomes necessary to retry, a new child of the request stream can be created.
The response stream is also buffered and held until either the response stream completes or the response buffer becomes full. If the response stream completes, we use the provided ResponseClassifier to determine if the request should be retried. If so, we discard the response stream, fork a new child of the request stream, and send the new request stream to the service. If not, we return the response stream to the caller.