|
| JObject * | j_object_new (gchar const *namespace, gchar const *name) |
| |
| JObject * | j_object_new_for_index (guint32 index, gchar const *namespace, gchar const *name) |
| |
| JObject * | j_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) |
| |
Data structures and functions for managing objects.
◆ JObject
◆ JObjectOperation
◆ j_object_create()
Creates an object.
- Parameters
-
| object | A JObject pointer to fill. |
| batch | A batch. |
- Todo:
- key = index + namespace
◆ j_object_delete()
Deletes an object.
- Parameters
-
| object | An object. |
| batch | A batch. |
◆ j_object_new()
| JObject * j_object_new |
( |
gchar const * |
namespace, |
|
|
gchar const * |
name |
|
) |
| |
Creates a new object.
JObject * j_object_new(gchar const *namespace, gchar const *name)
Definition jobject.c:955
- Parameters
-
| namespace | A namespace. |
| name | An 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.
JObject * j_object_new_for_index(guint32 index, gchar const *namespace, gchar const *name)
Definition jobject.c:975
- Parameters
-
| index | An object server index. Must be less than the return value of j_configuration_get_server_count(configuration, J_BACKEND_TYPE_OBJECT). |
| namespace | A namespace. |
| name | An 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
-
| object | An object. |
| data | A buffer to hold the read data. |
| length | Number of bytes to read. |
| offset | An offset within object. |
| bytes_read | Number of bytes read. |
| batch | A batch. |
◆ j_object_ref()
Increases an object's reference count.
JObject * j_object_ref(JObject *object)
Definition jobject.c:996
- Parameters
-
- 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
-
| object | An object. |
| modification_time | The modification time of object. |
| size | The size of object. |
| batch | A batch. |
◆ j_object_sync()
Sync an object.
- Parameters
-
| object | An object. |
| batch | A 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
-
◆ 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
-
| object | An object. |
| data | A buffer holding the data to write. |
| length | Number of bytes to write. |
| offset | An offset within object. |
| bytes_written | Number of bytes written. |
| batch | A batch. |