JULEA
Data Structures | Typedefs | Functions
Batch

Data Structures

struct  JBatch
 
struct  JBatchAsync
 

Typedefs

typedef struct JBatch JBatch
 
typedef void(* JBatchAsyncCallback) (JBatch *, gboolean, gpointer)
 
typedef struct JBatchAsync JBatchAsync
 

Functions

G_END_DECLS G_BEGIN_DECLS JBatchj_batch_new (JSemantics *semantics)
 
JBatchj_batch_new_for_template (JSemanticsTemplate template)
 
JBatchj_batch_ref (JBatch *batch)
 
void j_batch_unref (JBatch *batch)
 
JSemanticsj_batch_get_semantics (JBatch *batch)
 
gboolean j_batch_execute (JBatch *batch) G_GNUC_WARN_UNUSED_RESULT
 
void j_batch_execute_async (JBatch *batch, JBatchAsyncCallback callback, gpointer user_data)
 
void j_batch_wait (JBatch *batch)
 

Detailed Description

Typedef Documentation

◆ JBatch

typedef struct JBatch JBatch

◆ JBatchAsync

typedef struct JBatchAsync JBatchAsync

◆ JBatchAsyncCallback

typedef void(* JBatchAsyncCallback) (JBatch *, gboolean, gpointer)

Function Documentation

◆ j_batch_execute()

gboolean j_batch_execute ( JBatch batch)

Executes the batch.

Parameters
batchA batch.
Returns
TRUE on success, FALSE if an error occurred.

◆ j_batch_execute_async()

void j_batch_execute_async ( JBatch batch,
JBatchAsyncCallback  callback,
gpointer  user_data 
)

Executes the batch asynchronously.

Parameters
batchA batch.
callbackAn async callback.
user_dataArguments specified by the user for the callback.
Attention
Consistency as defined by the batch's semantics is ignored by choosing explicit asynchronous execution.
Returns
TRUE on success, FALSE if an error occurred.

◆ j_batch_get_semantics()

JSemantics * j_batch_get_semantics ( JBatch batch)

Returns a batch's semantics.

Parameters
batchA batch.
Returns
A semantics object.

◆ j_batch_new()

JBatch * j_batch_new ( JSemantics semantics)

Creates a new batch.

Parameters
semanticsA semantics object.
Returns
A new batch. Should be freed with j_batch_unref().

◆ j_batch_new_for_template()

JBatch * j_batch_new_for_template ( JSemanticsTemplate  template)

Creates a new batch for a semantics template.

JBatch* batch;
JBatch * j_batch_new_for_template(JSemanticsTemplate template)
Definition: jbatch.c:121
@ J_SEMANTICS_TEMPLATE_DEFAULT
Definition: jsemantics.h:42
Definition: jbatch.c:49
Parameters
templateA semantics template.
Returns
A new batch. Should be freed with j_batch_unref().

◆ j_batch_ref()

JBatch * j_batch_ref ( JBatch batch)

Increases the batch's reference count.

Parameters
batchA batch.
Returns
The batch.

◆ j_batch_unref()

void j_batch_unref ( JBatch batch)

Decreases the batch's reference count. When the reference count reaches zero, frees the memory allocated for the batch.

Parameters
batchA batch.

◆ j_batch_wait()

void j_batch_wait ( JBatch batch)

Wait for an asynchronous batch to finish.

Parameters
batchA batch.