JULEA
Data Structures | Typedefs | Functions
Object

Data Structures

struct  JObjectOperation
 
struct  JObject
 

Typedefs

typedef struct JObject JObject
 
typedef struct JObjectOperation JObjectOperation
 

Functions

JObjectj_object_new (gchar const *namespace, gchar const *name)
 
JObjectj_object_new_for_index (guint32 index, gchar const *namespace, gchar const *name)
 
JObjectj_object_ref (JObject *object)
 
void j_object_unref (JObject *object)
 
void j_object_create (JObject *object, JBatch *batch)
 
void j_object_delete (JObject *object, JBatch *batch)
 
void j_object_read (JObject *object, gpointer data, guint64 length, guint64 offset, guint64 *bytes_read, JBatch *batch)
 
void j_object_write (JObject *object, gconstpointer data, guint64 length, guint64 offset, guint64 *bytes_written, JBatch *batch)
 
void j_object_status (JObject *object, gint64 *modification_time, guint64 *size, JBatch *batch)
 
void j_object_sync (JObject *object, JBatch *batch)
 

Detailed Description

Data structures and functions for managing objects.

Typedef Documentation

◆ JObject

typedef struct JObject JObject

◆ JObjectOperation

Function Documentation

◆ j_object_create()

void j_object_create ( JObject object,
JBatch batch 
)

Creates an object.

Parameters
objectA JObject pointer to fill.
batchA batch.
Todo:
key = index + namespace

◆ j_object_delete()

void j_object_delete ( JObject object,
JBatch batch 
)

Deletes an object.

Parameters
objectAn object.
batchA batch.

◆ j_object_new()

JObject * j_object_new ( gchar const *  namespace,
gchar const *  name 
)

Creates a new object.

i = j_object_new("JULEA", "JULEA");
JObject * j_object_new(gchar const *namespace, gchar const *name)
Definition: jobject.c:955
Definition: jobject.c:82
Parameters
namespaceA namespace.
nameAn object name.
Returns
A new object. Should be freed with j_object_unref().

◆ j_object_new_for_index()

JObject * j_object_new_for_index ( guint32  index,
gchar const *  namespace,
gchar const *  name 
)

Creates a new object.

i = j_object_new_for_index(index, "JULEA", "JULEA");
JObject * j_object_new_for_index(guint32 index, gchar const *namespace, gchar const *name)
Definition: jobject.c:975
Parameters
indexAn object server index. Must be less than the return value of j_configuration_get_server_count(configuration, J_BACKEND_TYPE_OBJECT).
namespaceA namespace.
nameAn object name.
Returns
A new object. Should be freed with j_object_unref().

◆ j_object_read()

void j_object_read ( JObject object,
gpointer  data,
guint64  length,
guint64  offset,
guint64 *  bytes_read,
JBatch batch 
)

Reads an object.

Parameters
objectAn object.
dataA buffer to hold the read data.
lengthNumber of bytes to read.
offsetAn offset within object.
bytes_readNumber of bytes read.
batchA batch.

◆ j_object_ref()

JObject * j_object_ref ( JObject object)

Increases an object's reference count.

JObject * j_object_ref(JObject *object)
Definition: jobject.c:996
Parameters
objectAn object.
Returns
object.

◆ j_object_status()

void j_object_status ( JObject object,
gint64 *  modification_time,
guint64 *  size,
JBatch batch 
)

Get the status of an object.

Parameters
objectAn object.
modification_timeThe modification time of object.
sizeThe size of object.
batchA batch.

◆ j_object_sync()

void j_object_sync ( JObject object,
JBatch batch 
)

Sync an object.

Parameters
objectAn object.
batchA batch.

◆ j_object_unref()

void j_object_unref ( JObject object)

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

Parameters
objectAn object.

◆ j_object_write()

void j_object_write ( JObject object,
gconstpointer  data,
guint64  length,
guint64  offset,
guint64 *  bytes_written,
JBatch batch 
)

Writes an object.

Note
j_object_write() modifies bytes_written even if j_batch_execute() is not called.
Parameters
objectAn object.
dataA buffer holding the data to write.
lengthNumber of bytes to write.
offsetAn offset within object.
bytes_writtenNumber of bytes written.
batchA batch.