summaryrefslogtreecommitdiffstats
path: root/java/src/hdf
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-03-09 14:55:45 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-03-09 14:55:45 (GMT)
commitc5eec3d9917e136d73dc1ddfd33f54bdb42a533b (patch)
tree2230ee527126074aeaaae8eecc294ca636f61ebc /java/src/hdf
parentf16244254bc4d8c5dc538f824e2b3cf16cd8b6a7 (diff)
downloadhdf5-c5eec3d9917e136d73dc1ddfd33f54bdb42a533b.zip
hdf5-c5eec3d9917e136d73dc1ddfd33f54bdb42a533b.tar.gz
hdf5-c5eec3d9917e136d73dc1ddfd33f54bdb42a533b.tar.bz2
[svn-r29371] HDFFV-9624: SWMR apis added
Diffstat (limited to 'java/src/hdf')
-rw-r--r--java/src/hdf/hdf5lib/CMakeLists.txt2
-rw-r--r--java/src/hdf/hdf5lib/H5.java99
-rw-r--r--java/src/hdf/hdf5lib/HDF5Constants.java6
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java21
-rw-r--r--java/src/hdf/hdf5lib/callbacks/H5D_append_t.java22
5 files changed, 150 insertions, 0 deletions
diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt
index 56c1e59..ab4b6a3 100644
--- a/java/src/hdf/hdf5lib/CMakeLists.txt
+++ b/java/src/hdf/hdf5lib/CMakeLists.txt
@@ -17,6 +17,8 @@ SET_GLOBAL_VARIABLE (HDF5_JAVA_SOURCE_PACKAGES
set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SRCS
callbacks/H5A_iterate_cb.java
callbacks/H5A_iterate_t.java
+ callbacks/H5D_append_cb.java
+ callbacks/H5D_append_t.java
callbacks/H5D_iterate_cb.java
callbacks/H5D_iterate_t.java
callbacks/H5E_walk_cb.java
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index fbfc40a..c56ad4e 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -2824,8 +2824,63 @@ public class H5 implements java.io.Serializable {
**/
public synchronized static native void H5Fclear_elink_file_cache(long file_id) throws HDF5LibraryException;
+ /**
+ * H5Fstart_swmr_write will activate SWMR writing mode for a file associated with file_id. This routine will
+ * prepare and ensure the file is safe for SWMR writing.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Fstart_swmr_write(long file_id) throws HDF5LibraryException;
+
+ /**
+ * H5Fstart_mdc_logging starts logging metadata cache events if logging was previously enabled.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Fstart_mdc_logging(long file_id) throws HDF5LibraryException;
+
+ /**
+ * H5Fstop_mdc_logging stops logging metadata cache events if logging was previously enabled and is currently ongoing.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+ public synchronized static native void H5Fstop_mdc_logging(long file_id) throws HDF5LibraryException;
+
+ /**
+ * H5Fget_mdc_logging_status gets the current metadata cache logging status.
+ *
+ * @param file_id
+ * IN: Identifier of the target file.
+ *
+ * @param mdc_logging_status, the status
+ * mdc_logging_status[0] = is_enabled, whether logging is enabled
+ * mdc_logging_status[1] = is_currently_logging, whether events are currently being logged
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - mdc_logging_status is null.
+ **/
+ public synchronized static native void H5Fget_mdc_logging_status(long file_id, boolean[] mdc_logging_status)
+ throws HDF5LibraryException, NullPointerException;
+
+
+
// /////// unimplemented ////////
// ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
+ // herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info);
// ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info/*out*/);
// /**
@@ -5579,6 +5634,45 @@ public class H5 implements java.io.Serializable {
public synchronized static native void H5Pset_elink_file_cache_size(long fapl_id, int efc_size)
throws HDF5LibraryException;
+ /**
+ * H5Pset_mdc_log_options sets metadata cache logging options.
+ *
+ * @param fapl_id
+ * IN: File access property list identifier
+ * @param is_enabled
+ * IN: Whether logging is enabled.
+ * @param location
+ * IN: Location of log in UTF-8/ASCII (file path/name) (On Windows, this must be ASCII).
+ * @param start_on_access
+ * IN: Whether the logging begins as soon as the file is opened or created.
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ * @exception NullPointerException
+ * - location is null.
+ *
+ **/
+ public synchronized static native void H5Pset_mdc_log_options(long fapl_id, boolean is_enabled, String location, boolean start_on_access)
+ throws HDF5LibraryException, NullPointerException;
+
+ /**
+ * H5Pget_mdc_log_options gets metadata cache logging options.
+ *
+ * @param fapl_id
+ * IN: File access property list identifier
+ * @param mdc_log_options, the options
+ * mdc_logging_options[0] = is_enabled, whether logging is enabled
+ * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created
+ *
+ * @return the location of log in UTF-8/ASCII (file path/name) (On Windows, this must be ASCII).
+ *
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ *
+ **/
+ public synchronized static native String H5Pget_mdc_log_options(long fapl_id, boolean[] mdc_log_options)
+ throws HDF5LibraryException;
+
// Dataset creation property list (DCPL) routines //
/**
@@ -6107,6 +6201,11 @@ public class H5 implements java.io.Serializable {
**/
public synchronized static native long H5Pget_virtual_printf_gap(long dapl_id) throws HDF5LibraryException;
+ // public synchronized static native void H5Pset_append_flush(long plist_id, int ndims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
+
+ // public synchronized static native void H5Pget_append_flush(long plist_id, int dims, long[] boundary, H5D_append_cb func, H5D_append_t udata) throws HDF5LibraryException;
+
+
// Dataset xfer property list (DXPL) routines //
/**
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java
index 8089544..acd3eb5 100644
--- a/java/src/hdf/hdf5lib/HDF5Constants.java
+++ b/java/src/hdf/hdf5lib/HDF5Constants.java
@@ -201,6 +201,8 @@ public class HDF5Constants {
public static final int H5F_ACC_RDWR = H5F_ACC_RDWR();
public static final int H5F_ACC_TRUNC = H5F_ACC_TRUNC();
public static final int H5F_ACC_DEFAULT = H5F_ACC_DEFAULT();
+ public static final int H5F_ACC_SWMR_READ = H5F_ACC_SWMR_READ();
+ public static final int H5F_ACC_SWMR_WRITE = H5F_ACC_SWMR_WRITE();
public static final int H5F_CLOSE_DEFAULT = H5F_CLOSE_DEFAULT();
public static final int H5F_CLOSE_SEMI = H5F_CLOSE_SEMI();
public static final int H5F_CLOSE_STRONG = H5F_CLOSE_STRONG();
@@ -984,6 +986,10 @@ public class HDF5Constants {
private static native final int H5F_ACC_DEFAULT();
+ private static native final int H5F_ACC_SWMR_READ();
+
+ private static native final int H5F_ACC_SWMR_WRITE();
+
private static native final int H5F_CLOSE_DEFAULT();
private static native final int H5F_CLOSE_SEMI();
diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java
new file mode 100644
index 0000000..1b66e34
--- /dev/null
+++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java
@@ -0,0 +1,21 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+package hdf.hdf5lib.callbacks;
+
+//Information class for link callback(for H5Pset/get_append_flush)
+public interface H5D_append_cb extends Callbacks {
+ int callback(long dataset_id, long[] cur_dims, H5D_append_t op_data);
+}
diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java
new file mode 100644
index 0000000..dcbd331
--- /dev/null
+++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java
@@ -0,0 +1,22 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+package hdf.hdf5lib.callbacks;
+
+public interface H5D_append_t {
+/** public ArrayList iterdata = new ArrayList();
+ * Any derived interfaces must define the single public variable as above.
+ */
+}