public interface BackendResourceAbortable
Backendresource abstraction, such as
InputStream, which can be aborted without consuming it fully for efficiency.
Backend implementations such as
S3Backend may return an abortable
for a more optimal resource use.
S3Backend internally uses Apache HttpClient library which tries
to reuse HTTP connections by reading data fully to the end of an attached
by default. It can be efficient from a socket pool management perspective, but possibly a significant overhead
while bytes are read from S3 just to be discarded. So, a
Backend implementation that retrieves an abortable
resource may decide to wrap the underlying resource (e.g,
InputStream) by this interface (e.g,
S3BackendResourceAbortableInputStream) in order to abort the underlying resources (e.g, http request
object) without having to read data fully.
Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.