JULEA
Loading...
Searching...
No Matches
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
32G_BEGIN_DECLS
33
40struct JBatch;
41
42typedef struct JBatch JBatch;
43
44typedef void (*JBatchAsyncCallback)(JBatch*, gboolean, gpointer);
45
46G_END_DECLS
47
48#include <core/joperation.h>
49#include <core/jsemantics.h>
50
51G_BEGIN_DECLS
52
64
79
88
98void j_batch_unref(JBatch* batch);
99
100G_DEFINE_AUTOPTR_CLEANUP_FUNC(JBatch, j_batch_unref)
101
102
113
125void j_batch_add(JBatch* batch, JOperation* operation);
126
137gboolean j_batch_execute(JBatch* batch) G_GNUC_WARN_UNUSED_RESULT;
138
151void j_batch_execute_async(JBatch* batch, JBatchAsyncCallback callback, gpointer user_data);
152
162void j_batch_wait(JBatch* batch);
163
168G_END_DECLS
169
170#endif
void j_batch_execute_async(JBatch *batch, JBatchAsyncCallback callback, gpointer user_data)
Definition jbatch.c:286
JBatch * j_batch_ref(JBatch *batch)
Definition jbatch.c:145
void j_batch_wait(JBatch *batch)
Definition jbatch.c:304
JBatch * j_batch_new_for_template(JSemanticsTemplate template)
Definition jbatch.c:131
JSemantics * j_batch_get_semantics(JBatch *batch)
Definition jbatch.c:319
void j_batch_unref(JBatch *batch)
Definition jbatch.c:157
gboolean j_batch_execute(JBatch *batch) G_GNUC_WARN_UNUSED_RESULT
Definition jbatch.c:231
G_END_DECLS G_BEGIN_DECLS JBatch * j_batch_new(JSemantics *semantics)
Definition jbatch.c:113
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