|
JDistributedObject * | j_distributed_object_new (gchar const *namespace, gchar const *name, JDistribution *distribution) |
|
JDistributedObject * | j_distributed_object_ref (JDistributedObject *object) |
|
void | j_distributed_object_unref (JDistributedObject *object) |
|
void | j_distributed_object_create (JDistributedObject *object, JBatch *batch) |
|
void | j_distributed_object_delete (JDistributedObject *object, JBatch *batch) |
|
void | j_distributed_object_read (JDistributedObject *object, gpointer data, guint64 length, guint64 offset, guint64 *bytes_read, JBatch *batch) |
|
void | j_distributed_object_write (JDistributedObject *object, gconstpointer data, guint64 length, guint64 offset, guint64 *bytes_written, JBatch *batch) |
|
void | j_distributed_object_status (JDistributedObject *object, gint64 *modification_time, guint64 *size, JBatch *batch) |
|
void | j_distributed_object_sync (JDistributedObject *object, JBatch *batch) |
|
Data structures and functions for managing objects.
◆ JDistributedObject
◆ JDistributedObjectBackgroundData
◆ JDistributedObjectOperation
◆ JDistributedObjectReadBuffer
◆ j_distributed_object_create()
◆ j_distributed_object_delete()
Deletes an object.
- Parameters
-
object | An object. |
batch | A batch. |
◆ j_distributed_object_new()
Creates a new object.
JDistributedObject * j_distributed_object_new(gchar const *namespace, gchar const *name, JDistribution *distribution)
Definition: jdistributed-object.c:1366
Definition: jdistributed-object.c:131
Definition: jdistribution.c:48
- Parameters
-
namespace | A namespace. |
name | An object name. |
distribution | A distribution. |
- Returns
- A new object. Should be freed with j_distributed_object_unref().
◆ j_distributed_object_read()
void j_distributed_object_read |
( |
JDistributedObject * |
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_distributed_object_ref()
Increases an object's reference count.
JDistributedObject * j_distributed_object_ref(JDistributedObject *object)
Definition: jdistributed-object.c:1386
- Parameters
-
- Returns
object
.
◆ j_distributed_object_status()
void j_distributed_object_status |
( |
JDistributedObject * |
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_distributed_object_sync()
Sync an object.
- Parameters
-
object | An object. |
batch | A batch. |
◆ j_distributed_object_unref()
Decreases an object's reference count. When the reference count reaches zero, frees the memory allocated for the object.
- Parameters
-
◆ j_distributed_object_write()
void j_distributed_object_write |
( |
JDistributedObject * |
object, |
|
|
gconstpointer |
data, |
|
|
guint64 |
length, |
|
|
guint64 |
offset, |
|
|
guint64 * |
bytes_written, |
|
|
JBatch * |
batch |
|
) |
| |
Writes an object.
- Note
- j_distributed_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. |