summaryrefslogtreecommitdiffstats
path: root/java/src/jni
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-11-30 23:12:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-11-30 23:12:35 (GMT)
commit65be68a17d1e5bec7e51e5f3e2e03d22163f7817 (patch)
tree4fbed27e66a41c3d8cb6f4f75f30ffe923f9185c /java/src/jni
parent5922bbb45f03b0e84c3aef7e1ed1010273caa7e2 (diff)
downloadhdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.zip
hdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.tar.gz
hdf5-65be68a17d1e5bec7e51e5f3e2e03d22163f7817.tar.bz2
Add some Java methods that were missed earlier.
Diffstat (limited to 'java/src/jni')
-rw-r--r--java/src/jni/h5fImp.c64
-rw-r--r--java/src/jni/h5fImp.h27
-rw-r--r--java/src/jni/h5pImp.c90
-rw-r--r--java/src/jni/h5pImp.h18
4 files changed, 199 insertions, 0 deletions
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index 5862ae7..d4b3a3c 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -536,6 +536,70 @@ Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache
h5libraryError(env);
} /* end Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fstart_mdc_logging
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
+ (JNIEnv *env, jclass cls, jlong file_id)
+{
+ if (H5Fstart_mdc_logging((hid_t)file_id) < 0)
+ h5libraryError(env);
+} /* end Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fstop_mdc_logging
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
+ (JNIEnv *env, jclass cls, jlong file_id)
+{
+ if (H5Fstop_mdc_logging((hid_t)file_id) < 0)
+ h5libraryError(env);
+} /* end Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fget_mdc_logging_status
+ * Signature: (J[Z)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
+ (JNIEnv *env, jclass cls, jlong file_id, jbooleanArray mdc_logging_status)
+{
+ hbool_t is_enabled;
+ hbool_t is_currently_logging;
+ jboolean *mdc_logging_status_ptr;
+ jint size;
+ jboolean isCopy;
+
+ if (mdc_logging_status == NULL) {
+ h5nullArgument(env, "H5Fget_mdc_logging_status: mdc_logging_status is NULL");
+ } /* end if */
+ else {
+ size = (int)ENVPTR->GetArrayLength(ENVPAR mdc_logging_status);
+ if (size < 2) {
+ h5badArgument(env, "H5Fget_mdc_logging_status: length of mdc_logging_status < 2.");
+ } /* end if */
+ else {
+ if (H5Fget_mdc_logging_status((hid_t)file_id, &is_enabled, &is_currently_logging) < 0) {
+ h5libraryError(env);
+ } /* end if */
+ else {
+ mdc_logging_status_ptr = ENVPTR->GetBooleanArrayElements(ENVPAR mdc_logging_status, &isCopy);
+ mdc_logging_status_ptr[0] = (jboolean)is_enabled;
+ mdc_logging_status_ptr[1] = (jboolean)is_currently_logging;
+ ENVPTR->ReleaseBooleanArrayElements(ENVPAR mdc_logging_status, mdc_logging_status_ptr, 0);
+ } /* end else */
+ } /* end else */
+ } /* end else */
+} /* end Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status */
+
+
#ifdef __cplusplus
} /* end extern "C" */
diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h
index a501b7e..b88e491 100644
--- a/java/src/jni/h5fImp.h
+++ b/java/src/jni/h5fImp.h
@@ -212,6 +212,33 @@ JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Fclear_1elink_1file_1cache
(JNIEnv *, jclass, jlong);
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fstart_mdc_logging
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fstart_1mdc_1logging
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fstop_mdc_logging
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fstop_1mdc_1logging
+ (JNIEnv *, jclass, jlong);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Fget_mdc_logging_status
+ * Signature: (J[Z)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Fget_1mdc_1logging_1status
+ (JNIEnv *, jclass, jlong, jbooleanArray);
+
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index 01da210..1368139 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -5007,6 +5007,96 @@ H5P_cls_close_cb
return (herr_t)status;
} /* end H5P_cls_close_cb */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_mdc_log_options
+ * Signature: (JZLjava/lang/String;Z)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options
+ (JNIEnv *env, jclass clss, jlong fapl_id, jboolean is_enabled, jstring location, jboolean start_on_access)
+{
+ herr_t retVal = -1;
+ const char *lstr;
+
+ PIN_JAVA_STRING(location, lstr);
+
+ retVal = H5Pset_mdc_log_options((hid_t)fapl_id, (hbool_t)is_enabled, lstr, (hbool_t)start_on_access);
+
+ UNPIN_JAVA_STRING(location, lstr);
+
+ if (retVal < 0) {
+ h5libraryError(env);
+ }
+} /* end Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_mdc_log_options
+ * Signature: (J[Z)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options
+ (JNIEnv *env, jclass clss, jlong fapl_id, jbooleanArray mdc_log_options)
+{
+ hbool_t is_enabled;
+ hbool_t start_on_access;
+ jboolean *mdc_log_options_ptr;
+ char *lname;
+ size_t location_size;
+ ssize_t status;
+ jstring str = NULL;
+ jint size;
+ jboolean isCopy;
+
+ if (mdc_log_options == NULL) {
+ h5nullArgument(env, "H5Fget_mdc_log_options: mdc_log_options is NULL");
+ } /* end if */
+ else {
+ size = (int)ENVPTR->GetArrayLength(ENVPAR mdc_log_options);
+ if (size < 2) {
+ h5badArgument(env, "H5Fget_mdc_log_options: length of mdc_log_options < 2.");
+ } /* end if */
+ else {
+ /* get the length of the filename */
+ H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, NULL, &location_size, &start_on_access);
+ if (location_size < 0) {
+ h5badArgument(env, "H5Pget_mdc_log_options: location_size < 0");
+ }/* end if */
+ else if (location_size > 0) {
+ location_size++; /* add extra space for the null terminator */
+ lname = (char *)HDmalloc(sizeof(char) * location_size);
+ if (lname == NULL) {
+ h5outOfMemory(env, "H5Pget_mdc_log_options: malloc failed");
+ } /* end if */
+ else {
+ status = H5Pget_mdc_log_options((hid_t)fapl_id, &is_enabled, lname, &location_size, &start_on_access);
+
+ if (status < 0) {
+ HDfree(lname);
+ h5libraryError(env);
+ } /* end if */
+ else {
+ str = ENVPTR->NewStringUTF(ENVPAR lname);
+ HDfree(lname);
+ if (str == NULL) {
+ h5JNIFatalError(env, "H5Pget_mdc_log_options: return string not allocated");
+ } /* end if */
+ else {
+ mdc_log_options_ptr = ENVPTR->GetBooleanArrayElements(ENVPAR mdc_log_options, &isCopy);
+ mdc_log_options_ptr[0] = (jboolean)is_enabled;
+ mdc_log_options_ptr[1] = (jboolean)start_on_access;
+ ENVPTR->ReleaseBooleanArrayElements(ENVPAR mdc_log_options, mdc_log_options_ptr, 0);
+ } /* end else */
+ } /* end else */
+ } /* end else */
+ } /* end else if*/
+ } /* end else */
+ } /* end else */
+
+ return (jstring)str;
+} /* end if */
+
static herr_t
H5D_append_cb
(hid_t dataset_id, hsize_t *cur_dims, void *op_data)
diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h
index d606b7a..927501e 100644
--- a/java/src/jni/h5pImp.h
+++ b/java/src/jni/h5pImp.h
@@ -1404,6 +1404,24 @@ Java_hdf_hdf5lib_H5_H5Pset_1file_1space
/*
* Class: hdf_hdf5lib_H5
+ * Method: H5Pset_mdc_log_options
+ * Signature: (JZLjava/lang/String;Z)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1mdc_1log_1options
+(JNIEnv *, jclass, jlong, jboolean, jstring, jboolean);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_mdc_log_options
+ * Signature: (J[Z)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1mdc_1log_1options
+(JNIEnv *, jclass, jlong, jbooleanArray);
+
+/*
+ * Class: hdf_hdf5lib_H5
* Method: H5Pset_append_flush
* Signature: (JI[JLjava/lang/Object;Ljava/lang/Object;)V
*/