Interface BackendResourceAbortable
-
- All Known Implementing Classes:
S3BackendResourceAbortableInputStream
public interface BackendResourceAbortable
Backend
resource abstraction, such asInputStream
, which can be aborted without consuming it fully for efficiency.Some
Backend
implementations such asS3Backend
may return an abortableInputStream
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 attachedInputStream
onInputStream.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, aBackend
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abort()
Abort the underlying backend resource(s).
-