mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user