diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-20 12:24:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-11-20 12:24:57 (GMT) |
commit | 3b0c2b24da5689990c4bc0fcd3afecdf063086c8 (patch) | |
tree | 242d3501c98bef92e6befd920e8a9efdf2f1715b /java/src/jni | |
parent | f6ad126673553838df0dec514c5d2c1b4b70df1a (diff) | |
download | hdf5-3b0c2b24da5689990c4bc0fcd3afecdf063086c8.zip hdf5-3b0c2b24da5689990c4bc0fcd3afecdf063086c8.tar.gz hdf5-3b0c2b24da5689990c4bc0fcd3afecdf063086c8.tar.bz2 |
Bring over support for retrying metadata cache entry loads, along with all the
supporting metadata cache callback changes, etc.
Diffstat (limited to 'java/src/jni')
-rw-r--r-- | java/src/jni/h5pImp.c | 34 | ||||
-rw-r--r-- | java/src/jni/h5pImp.h | 19 |
2 files changed, 53 insertions, 0 deletions
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index 7c71da1..01da210 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -5542,6 +5542,40 @@ Java_hdf_hdf5lib_H5_H5Piterate return (jint)status; } /* end Java_hdf_hdf5lib_H5_H5Piterate */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_metadata_read_attempts + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts + (JNIEnv *env, jclass clss, jlong plist_id) +{ + unsigned attempts; + if (H5Pget_metadata_read_attempts((hid_t)plist_id, &attempts) < 0) + h5libraryError(env); + + return (jlong) attempts; +} /* end Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts */ + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_metadata_read_attempts + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts + (JNIEnv *env, jclass clss, jlong plist_id, jlong attempts) +{ + if (attempts <= 0) { + h5badArgument(env, "H5Pset_metadata_read_attempts: attempts <= 0"); + } /* end if */ + else { + if(H5Pset_metadata_read_attempts((hid_t)plist_id, (unsigned)attempts) < 0) + h5libraryError(env); + } /* end else */ +} /* end Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts */ + #ifdef __cplusplus } /* end extern "C" */ #endif /* __cplusplus */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index 2269624..d606b7a 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1473,6 +1473,25 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Piterate (JNIEnv*, jclass, jlong, jintArray, jobject, jobject); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pget_metadata_read_attempts + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL +Java_hdf_hdf5lib_H5_H5Pget_1metadata_1read_1attempts +(JNIEnv *, jclass, jlong); + + +/* + * Class: hdf_hdf5lib_H5 + * Method: H5Pset_metadata_read_attempts + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5Pset_1metadata_1read_1attempts +(JNIEnv *, jclass, jlong, jlong); + #ifdef __cplusplus } /* end extern "C" */ |