Martin Desruisseaux created SIS-573:
---------------------------------------
Summary: Allow data stores to be closed asynchronously
Key: SIS-573
URL: https://issues.apache.org/jira/browse/SIS-573
Project: Spatial Information Systems
Issue Type: Task
Components: Storage
Affects Versions: 1.3
Reporter: Martin Desruisseaux
Assignee: Martin Desruisseaux
Fix For: 1.4
A {{DataStore}} can be connected to a big file through internet, for example if
the file is a Cloud Optimized GeoTIFF (COG). This is reasonably efficient if
the server support HTTP ranges. But if the {{GeoTiffStore}} (for example) is
connected to a big TIFF on a server that do not support HTTP range, it may
download a large amount of data. We need a way to interrupt that.
Implementing an {{abort()}} method would be a significant amount of work. But
as a mid-term solution, we need to at least get {{DataStore.close()}} to work
asynchronously. In current {{DataStore}} implementations, {{close()}} is a
synchronized method which block until the reading process is completed. We
should invole {{Channel.close()}} before to enter in the synchronized block. It
will allow {{java.nio.channels.AsynchronousCloseException}} to be thrown an
interrupt the reading process.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)