JULEA
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
Distributed Object

Data Structures

struct  JDistributedObjectBackgroundData
 
struct  JDistributedObjectReadBuffer
 
struct  JDistributedObjectOperation
 
struct  JDistributedObject
 

Typedefs

typedef struct JDistributedObject JDistributedObject
 
typedef struct JDistributedObjectBackgroundData JDistributedObjectBackgroundData
 
typedef struct JDistributedObjectReadBuffer JDistributedObjectReadBuffer
 
typedef struct JDistributedObjectOperation JDistributedObjectOperation
 

Functions

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)
 

Detailed Description

Data structures and functions for managing objects.

Typedef Documentation

◆ JDistributedObject

◆ JDistributedObjectBackgroundData

◆ JDistributedObjectOperation

◆ JDistributedObjectReadBuffer

Function Documentation

◆ j_distributed_object_create()

void j_distributed_object_create ( JDistributedObject *  object,
JBatch *  batch 
)

Creates an object.

Parameters
objectAn object.
batchA batch.
Returns
A new object. Should be freed with j_distributed_object_unref().
Todo:
key = index + namespace

◆ j_distributed_object_delete()

void j_distributed_object_delete ( JDistributedObject *  object,
JBatch *  batch 
)

Deletes an object.

Parameters
objectAn object.
batchA batch.

◆ j_distributed_object_new()

JDistributedObject * j_distributed_object_new ( gchar const *  namespace,
gchar const *  name,
JDistribution *  distribution 
)

Creates a new object.

i = j_distributed_object_new("JULEA", "JULEA", d);
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
namespaceA namespace.
nameAn object name.
distributionA 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
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_distributed_object_ref()

JDistributedObject * j_distributed_object_ref ( JDistributedObject *  object)

Increases an object's reference count.

JDistributedObject * j_distributed_object_ref(JDistributedObject *object)
Definition jdistributed-object.c:1386
Parameters
objectAn object.
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
objectAn object.
modification_timeThe modification time of object.
sizeThe size of object.
batchA batch.

◆ j_distributed_object_sync()

void j_distributed_object_sync ( JDistributedObject *  object,
JBatch *  batch 
)

Sync an object.

Parameters
objectAn object.
batchA batch.

◆ j_distributed_object_unref()

void j_distributed_object_unref ( JDistributedObject *  object)

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

Parameters
objectAn object.

◆ 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
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.