JULEA
jbatch.h
Go to the documentation of this file.
1 /*
2  * JULEA - Flexible storage framework
3  * Copyright (C) 2010-2024 Michael Kuhn
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
23 #ifndef JULEA_BATCH_H
24 #define JULEA_BATCH_H
25 
26 #if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
27 #error "Only <julea.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 G_BEGIN_DECLS
33 
40 struct JBatch;
41 
42 typedef struct JBatch JBatch;
43 
44 typedef void (*JBatchAsyncCallback)(JBatch*, gboolean, gpointer);
45 
46 G_END_DECLS
47 
48 #include <core/joperation.h>
49 #include <core/jsemantics.h>
50 
51 G_BEGIN_DECLS
52 
64 
79 
87 JBatch* j_batch_ref(JBatch* batch);
88 
98 void j_batch_unref(JBatch* batch);
99 
100 G_DEFINE_AUTOPTR_CLEANUP_FUNC(JBatch, j_batch_unref)
101 
102 
113 
125 void j_batch_add(JBatch* batch, JOperation* operation);
126 
137 gboolean j_batch_execute(JBatch* batch) G_GNUC_WARN_UNUSED_RESULT;
138 
151 void j_batch_execute_async(JBatch* batch, JBatchAsyncCallback callback, gpointer user_data);
152 
162 void j_batch_wait(JBatch* batch);
163 
168 G_END_DECLS
169 
170 #endif
void j_batch_execute_async(JBatch *batch, JBatchAsyncCallback callback, gpointer user_data)
Definition: jbatch.c:276
JBatch * j_batch_ref(JBatch *batch)
Definition: jbatch.c:135
void j_batch_wait(JBatch *batch)
Definition: jbatch.c:294
JBatch * j_batch_new_for_template(JSemanticsTemplate template)
Definition: jbatch.c:121
JSemantics * j_batch_get_semantics(JBatch *batch)
Definition: jbatch.c:309
void j_batch_unref(JBatch *batch)
Definition: jbatch.c:147
gboolean j_batch_execute(JBatch *batch) G_GNUC_WARN_UNUSED_RESULT
Definition: jbatch.c:221
G_END_DECLS G_BEGIN_DECLS JBatch * j_batch_new(JSemantics *semantics)
Definition: jbatch.c:103
void(* JBatchAsyncCallback)(JBatch *, gboolean, gpointer)
Definition: jbatch.h:44
JSemanticsTemplate
Definition: jsemantics.h:41
Definition: jbatch.c:49
JSemantics * semantics
Definition: jbatch.c:58
Definition: joperation.h:50
Definition: jsemantics.c:42