diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-08-19 16:58:44 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-08-19 16:58:52 (GMT) |
commit | 935f27c1b803faf981131ff936619aecd9f76e38 (patch) | |
tree | f0e9d3d639c522cdc187088d95de293902567b3b /java/src | |
parent | 06e5cbd54149087de0c7d99f1d14be5729d6c129 (diff) | |
download | hdf5-935f27c1b803faf981131ff936619aecd9f76e38.zip hdf5-935f27c1b803faf981131ff936619aecd9f76e38.tar.gz hdf5-935f27c1b803faf981131ff936619aecd9f76e38.tar.bz2 |
HDFFV-10887 Implement requested functions
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/hdf/hdf5lib/H5.java | 7 | ||||
-rw-r--r-- | java/src/jni/h5oImp.c | 60 | ||||
-rw-r--r-- | java/src/jni/h5oImp.h | 27 |
3 files changed, 90 insertions, 4 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 481ca8c..4b563fd 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -5048,10 +5048,9 @@ public class H5 implements java.io.Serializable { **/ public synchronized static native void H5Orefresh(long object_id) throws HDF5LibraryException; - // /////// unimplemented //////// - // herr_t H5Odisable_mdc_flushes(hid_t object_id); - // herr_t H5Oenable_mdc_flushes(hid_t object_id); - // herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); + public synchronized static native void H5Odisable_mdc_flushes(long object_id); + public synchronized static native void H5Oenable_mdc_flushes(long object_id); + public synchronized static native boolean H5Oare_mdc_flushes_disabled(long object_id); // //////////////////////////////////////////////////////////// // // diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index cc88b81..b49a3e9 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -856,6 +856,66 @@ done: return; } /* end Java_hdf_hdf5lib_H5_H5Orefresh */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Odisable_mdc_flushes + * Signature: (J)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Odisable_1mdc_1flushes + (JNIEnv *env, jclass clss, jlong loc_id) +{ + UNUSED(clss); + + if (H5Odisable_mdc_flushes((hid_t)loc_id) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return; +} /* end Java_hdf_hdf5lib_H5_H5Odisable_1mdc_1flushes */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Oenable_mdc_flushes + * Signature: (J)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Oenable_1mdc_1flushes + (JNIEnv *env, jclass clss, jlong loc_id) +{ + UNUSED(clss); + + if (H5Oenable_mdc_flushes((hid_t)loc_id) < 0) + H5_LIBRARY_ERROR(ENVONLY); + +done: + return; +} /* end Java_hdf_hdf5lib_H5_H5Oenable_1mdc_1flushes */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Oare_mdc_flushes_disabled + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled + (JNIEnv *env, jclass clss, jlong loc_id) +{ + jboolean bval = JNI_FALSE; + hbool_t is_disabled = FALSE; + + UNUSED(clss); + + if (H5Oare_mdc_flushes_disabled((hid_t)loc_id, &is_disabled) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (is_disabled == TRUE) + bval = JNI_TRUE; + +done: + return bval; +} /* end Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled */ + #ifdef __cplusplus diff --git a/java/src/jni/h5oImp.h b/java/src/jni/h5oImp.h index cb8c776..5241aba 100644 --- a/java/src/jni/h5oImp.h +++ b/java/src/jni/h5oImp.h @@ -202,6 +202,33 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Orefresh (JNIEnv*, jclass, jlong); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Odisable_mdc_flushes + * Signature: (J)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Odisable_1mdc_1flushes + (JNIEnv*, jclass, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Oenable_mdc_flushes + * Signature: (J)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Oenable_1mdc_1flushes + (JNIEnv*, jclass, jlong); + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Oare_mdc_flushes_disabled + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled + (JNIEnv*, jclass, jlong); + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ |