summaryrefslogtreecommitdiffstats
path: root/java/src/jni
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni')
-rw-r--r--java/src/jni/h5Constants.c12
-rw-r--r--java/src/jni/h5pImp.c115
-rw-r--r--java/src/jni/h5pImp.h51
3 files changed, 140 insertions, 38 deletions
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index ccd0b91..c6aa16c 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -403,17 +403,15 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1UNLIMITED(JNIEnv *env, jclass cls) { return (jint)H5F_UNLIMITED; }
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_DEFAULT; }
+Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1FSM_1AGGR(JNIEnv *env, jclass cls) { return H5F_FSPACE_STRATEGY_FSM_AGGR; }
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1ALL_1PERSIST(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_ALL_PERSIST; }
+Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1AGGR(JNIEnv *env, jclass cls) { return H5F_FSPACE_STRATEGY_AGGR; }
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1ALL(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_ALL; }
+Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1PAGE(JNIEnv *env, jclass cls) { return H5F_FSPACE_STRATEGY_PAGE; }
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1AGGR_1VFD(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_AGGR_VFD; }
+Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1NONE(JNIEnv *env, jclass cls) { return H5F_FSPACE_STRATEGY_NONE; }
JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1VFD(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_VFD; }
-JNIEXPORT jint JNICALL
-Java_hdf_hdf5lib_HDF5Constants_H5F_1FILE_1SPACE_1NTYPES(JNIEnv *env, jclass cls) { return H5F_FILE_SPACE_NTYPES; }
+Java_hdf_hdf5lib_HDF5Constants_H5F_1FSPACE_1STRATEGY_1NTYPES(JNIEnv *env, jclass cls) { return H5F_FSPACE_STRATEGY_NTYPES; }
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5FD_1CORE(JNIEnv *env, jclass cls) { return H5FD_CORE; }
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index 1368139..f39f0e6 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -4883,61 +4883,130 @@ Java_hdf_hdf5lib_H5_H5Pset_1virtual_1printf_1gap
/*
* Class: hdf_hdf5lib_H5
- * Method: H5Pget_file_space
- * Signature: (J[I[J)V
+ * Method: H5Pget_file_space_strategy
+ * Signature: (J[Z[J)I
*/
-JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Pget_1file_1space
- (JNIEnv *env, jclass clss, jlong fcpl_id, jintArray strategy, jlongArray threshold)
+JNIEXPORT jint JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy
+ (JNIEnv *env, jclass clss, jlong fcpl_id, jbooleanArray persist, jlongArray threshold)
{
herr_t status = -1;
- jint *thestrategyArray = NULL;
+ H5F_fspace_strategy_t thestrategy = H5F_FSPACE_STRATEGY_FSM_AGGR; /* Library default */
jlong *thethresholdArray = NULL;
+ jboolean *thepersistArray = NULL;
jboolean isCopy;
- if (strategy) {
- thestrategyArray = (jint*)ENVPTR->GetIntArrayElements(ENVPAR strategy, &isCopy);
- if (thestrategyArray == NULL) {
- h5JNIFatalError(env, "H5Pget_file_space: strategy not pinned");
- return;
+ if (persist) {
+ thepersistArray = (jboolean*)ENVPTR->GetBooleanArrayElements(ENVPAR persist, &isCopy);
+ if (thepersistArray == NULL) {
+ h5JNIFatalError(env, "H5Pget_file_space: persist not pinned");
+ return -1;
}
}
if (threshold) {
thethresholdArray = (jlong*)ENVPTR->GetLongArrayElements(ENVPAR threshold, &isCopy);
if (thethresholdArray == NULL) {
- if (strategy) ENVPTR->ReleaseIntArrayElements(ENVPAR strategy, thestrategyArray, JNI_ABORT);
+ if (persist) ENVPTR->ReleaseBooleanArrayElements(ENVPAR persist, thepersistArray, JNI_ABORT);
h5JNIFatalError(env, "H5Pget_file_space: threshold not pinned");
- return;
+ return -1;
} /* end if */
} /* end if */
- status = H5Pget_file_space((hid_t)fcpl_id, (H5F_file_space_type_t*)thestrategyArray, (hsize_t*)thethresholdArray);
+ status = H5Pget_file_space_strategy((hid_t)fcpl_id, &thestrategy, (hbool_t*)thepersistArray, (hsize_t*)thethresholdArray);
if (status < 0) {
- if (strategy) ENVPTR->ReleaseIntArrayElements(ENVPAR strategy, thestrategyArray, JNI_ABORT);
+ if (persist) ENVPTR->ReleaseBooleanArrayElements(ENVPAR persist, thepersistArray, JNI_ABORT);
if (threshold) ENVPTR->ReleaseLongArrayElements(ENVPAR threshold, thethresholdArray, JNI_ABORT);
h5libraryError(env);
} /* end if */
else {
- if (strategy) ENVPTR->ReleaseIntArrayElements(ENVPAR strategy, thestrategyArray, 0);
+ if (persist) ENVPTR->ReleaseBooleanArrayElements(ENVPAR persist, thepersistArray, 0);
if (threshold) ENVPTR->ReleaseLongArrayElements(ENVPAR threshold, thethresholdArray, 0);
} /* end else */
-} /* end Java_hdf_hdf5lib_H5_H5Pget_1file_1space */
+ return (jint)thestrategy;
+} /* end Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_strategy_persist
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy_1persist
+ (JNIEnv *env, jclass clss, jlong fcpl_id)
+{
+ herr_t status = -1;
+ hbool_t thepersist = FALSE;
+
+ status = H5Pget_file_space_strategy((hid_t)fcpl_id, NULL, &thepersist, NULL);
+
+ if (status < 0)
+ h5libraryError(env);
+
+ return (jboolean)thepersist;
+} /* end Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy_1persist */
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_strategy_threshold
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy_1threshold
+ (JNIEnv *env, jclass clss, jlong fcpl_id)
+{
+ herr_t status = -1;
+ hsize_t thethreshold;
+
+ status = H5Pget_file_space_strategy((hid_t)fcpl_id, NULL, NULL, &thethreshold);
+
+ if (status < 0)
+ h5libraryError(env);
+
+ return (jlong)thethreshold;
+} /* end Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1threshold */
/*
* Class: hdf_hdf5lib_H5
- * Method: H5Pset_file_space
- * Signature: (JIJ)V
+ * Method: H5Pset_file_space_strategy
+ * Signature: (JIZJ)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Pset_1file_1space
- (JNIEnv *env, jclass clss, jlong fcpl_id, jint strategy, jlong threshold)
+Java_hdf_hdf5lib_H5_H5Pset_1file_1space_1strategy
+ (JNIEnv *env, jclass clss, jlong fcpl_id, jint strategy, jboolean persist, jlong threshold)
{
- if (H5Pset_file_space((hid_t)fcpl_id, (H5F_file_space_type_t)strategy, (hsize_t)threshold) < 0)
+ if (H5Pset_file_space_strategy((hid_t)fcpl_id, (H5F_fspace_strategy_t)strategy, (hbool_t)persist, (hsize_t)threshold) < 0)
h5libraryError(env);
-} /* end Java_hdf_hdf5lib_H5_H5Pset_1file_1space */
+} /* end Java_hdf_hdf5lib_H5_H5Pset_file_space_strategy */
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_file_space_page_size
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL
+Java_hdf_hdf5lib_H5_H5Pset_1file_1space_1page_1size
+ (JNIEnv *env, jclass clss, jlong fcpl_id, jlong fsp_size)
+{
+ if (H5Pset_file_space_page_size((hid_t)fcpl_id, (hsize_t)fsp_size) < 0)
+ h5libraryError(env);
+}
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_page_size
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1page_1size
+ (JNIEnv *env, jclass clss, jlong fcpl_id)
+{
+ hsize_t fsp_size = 0;
+ if (H5Pget_file_space_page_size((hid_t)fcpl_id, &fsp_size) < 0)
+ h5libraryError(env);
+ return (jlong)fsp_size;
+}
static herr_t
H5P_cls_create_cb
diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h
index 927501e..03b0e03 100644
--- a/java/src/jni/h5pImp.h
+++ b/java/src/jni/h5pImp.h
@@ -1385,22 +1385,57 @@ Java_hdf_hdf5lib_H5_H5Pset_1virtual_1printf_1gap
/*
* Class: hdf_hdf5lib_H5
- * Method: H5Pget_file_space
- * Signature: (J[I[J)V
+ * Method: H5Pget_file_space_strategy
+ * Signature: (J[Z[J)I
+ */
+JNIEXPORT jint JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy
+(JNIEnv *, jclass, jlong, jbooleanArray, jlongArray);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_strategy_persist
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy_1persist
+(JNIEnv *, jclass, jlong);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_strategy_threshold
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1strategy_1threshold
+(JNIEnv *, jclass, jlong);
+
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pset_file_space_strategy
+ * Signature: (JIZJ)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Pget_1file_1space
-(JNIEnv *, jclass, jlong, jintArray, jlongArray);
+Java_hdf_hdf5lib_H5_H5Pset_1file_1space_1strategy
+(JNIEnv *, jclass, jlong, jint, jboolean, jlong);
+/*
+ * Class: hdf_hdf5lib_H5
+ * Method: H5Pget_file_space_page_size
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL
+Java_hdf_hdf5lib_H5_H5Pget_1file_1space_1page_1size
+(JNIEnv *, jclass, jlong);
/*
* Class: hdf_hdf5lib_H5
- * Method: H5Pset_file_space
- * Signature: (JIJ)V
+ * Method: H5Pset_file_space_page_size
+ * Signature: (JJ)V
*/
JNIEXPORT void JNICALL
-Java_hdf_hdf5lib_H5_H5Pset_1file_1space
-(JNIEnv *, jclass, jlong, jint, jlong);
+Java_hdf_hdf5lib_H5_H5Pset_1file_1space_1page_1size
+(JNIEnv *, jclass, jlong, jlong);
/*
* Class: hdf_hdf5lib_H5