VOL refactor and cleanup (#4856)

Cleanup and prepare for thread-safety changes.

Big ideas:

* Wrap H5VL_class_t with H5VL_connector_t, so use of the class can be refcounted within the H5VL package, instead of relying on storing an ID within the H5VL_t struct and incrementing & decrementing the ID's refcount.
* Register H5VL_connector_t* for VOL connector IDs, instead of the H5VL_class_t*
* Stop other packages from rummaging around inside H5VL_connector_t and H5VL_object_t data structures, so that the H5VL package can change implementation details without coupled changes throughout the library

Small things:

* Simplified the coding for creating links
* Moved some routines into more logical locations
This commit is contained in:
Quincey Koziol
2024-10-03 12:19:33 -07:00
committed by GitHub
parent 626f639850
commit 767282f68a
69 changed files with 2404 additions and 2079 deletions
+6 -3
View File
@@ -98,7 +98,8 @@ public class TestH5VL {
*/
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
assertEquals(HDF5Constants.H5VL_NATIVE, native_id);
assertTrue("H5.H5VLcmp_connector_cls(H5VL_NATIVE_NAME, native_id)",
H5.H5VLcmp_connector_cls(HDF5Constants.H5VL_NATIVE, native_id));
}
catch (Throwable err) {
err.printStackTrace();
@@ -122,7 +123,8 @@ public class TestH5VL {
try {
long native_id = H5.H5VLget_connector_id_by_name(HDF5Constants.H5VL_NATIVE_NAME);
assertTrue("H5.H5VLget_connector_id_by_name H5VL_NATIVE_NAME", native_id >= 0);
assertEquals(HDF5Constants.H5VL_NATIVE, native_id);
assertTrue("H5.H5VLcmp_connector_cls(H5VL_NATIVE_NAME, native_id)",
H5.H5VLcmp_connector_cls(HDF5Constants.H5VL_NATIVE, native_id));
}
catch (Throwable err) {
err.printStackTrace();
@@ -136,7 +138,8 @@ public class TestH5VL {
try {
long native_id = H5.H5VLget_connector_id_by_value(HDF5Constants.H5VL_NATIVE_VALUE);
assertTrue("H5.H5VLget_connector_id_by_value H5VL_NATIVE_VALUE", native_id >= 0);
assertEquals(HDF5Constants.H5VL_NATIVE, native_id);
assertTrue("H5.H5VLcmp_connector_cls(H5VL_NATIVE_NAME, native_id)",
H5.H5VLcmp_connector_cls(HDF5Constants.H5VL_NATIVE, native_id));
}
catch (Throwable err) {
err.printStackTrace();