- All Known Implementing Classes:
public interface BackendResourceAbortable
Backendresource abstraction, such as
InputStream, which can be aborted without consuming it fully for efficiency.
Backendimplementations such as
S3Backendmay return an abortable
InputStreamfor a more optimal resource use.
S3Backendinternally uses Apache HttpClient library which tries to reuse HTTP connections by reading data fully to the end of an attached
InputStream.close()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
Backendimplementation 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.