mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00

* Auto-generated doxygen config file. * Customize doxygen config file for Plasma. * Format plasma_client.h and plasma.h for doxygen.
106 lines
3.8 KiB
C
106 lines
3.8 KiB
C
#ifndef PLASMA_CLIENT_H
|
|
#define PLASMA_CLIENT_H
|
|
|
|
/**
|
|
* Connect to the local plasma store UNIX domain socket with path socket_name
|
|
* and return the resulting connection.
|
|
*
|
|
* @param socket_name The name of the socket to use to connect to the Plasma
|
|
* Store.
|
|
* @return The object containing the connection state.
|
|
*/
|
|
plasma_store_conn *plasma_store_connect(const char *socket_name);
|
|
|
|
/**
|
|
* Connect to a possibly remote Plasma Manager.
|
|
*
|
|
* @param addr The IP address of the Plasma Manager to connect to.
|
|
* @param port The port of the Plasma Manager to connect to.
|
|
* @return The file descriptor to use to send messages to the Plasma Manager.
|
|
*/
|
|
int plasma_manager_connect(const char *addr, int port);
|
|
|
|
/**
|
|
* Create an object in the Plasma Store. Any metadata for this object must be
|
|
* be passed in when the object is created.
|
|
*
|
|
* @param conn The object containing the connection state.
|
|
* @param object_id The ID to use for the newly created object.
|
|
* @param size The size in bytes of the space to be allocated for this object's
|
|
data (this does not include space used for metadata).
|
|
* @param metadata The object's metadata. If there is no metadata, this pointer
|
|
should be NULL.
|
|
* @param metadata_size The size in bytes of the metadata. If there is no
|
|
metadata, this should be 0.
|
|
* @param data The address of the newly created object will be written here.
|
|
* @return Void.
|
|
*/
|
|
void plasma_create(plasma_store_conn *conn,
|
|
plasma_id object_id,
|
|
int64_t size,
|
|
uint8_t *metadata,
|
|
int64_t metadata_size,
|
|
uint8_t **data);
|
|
|
|
/**
|
|
* Get an object from the Plasma Store. This function will block until the
|
|
* object has been created and sealed in the Plasma Store.
|
|
*
|
|
* @param conn The object containing the connection state.
|
|
* @param object_id The ID of the object to get.
|
|
* @param size The size in bytes of the retrieved object will be written at this
|
|
address.
|
|
* @param data The address of the object will be written at this address.
|
|
* @param metadata_size The size in bytes of the object's metadata will be
|
|
* written at this address.
|
|
* @param metadata The address of the object's metadata will be written at this
|
|
* address.
|
|
* @return Void.
|
|
*/
|
|
void plasma_get(plasma_store_conn *conn,
|
|
plasma_id object_id,
|
|
int64_t *size,
|
|
uint8_t **data,
|
|
int64_t *metadata_size,
|
|
uint8_t **metadata);
|
|
|
|
/**
|
|
* Check if the object store contains a particular object and the object has
|
|
* been sealed. The result will be stored in has_object.
|
|
*
|
|
* @todo: We may want to indicate if the object has been created but not sealed.
|
|
*
|
|
* @param conn The object containing the connection state.
|
|
* @param object_id The ID of the object whose presence we are checking.
|
|
* @param has_object The function will write 1 at this address if the object is
|
|
* present and 0 if it is not present.
|
|
* @return Void.
|
|
*/
|
|
void plasma_contains(plasma_store_conn *conn,
|
|
plasma_id object_id,
|
|
int *has_object);
|
|
|
|
/**
|
|
* Seal an object in the object store. The object will be immutable after this
|
|
* call.
|
|
*
|
|
* @param conn The object containing the connection state.
|
|
* @param object_id The ID of the object to seal.
|
|
* @return Void.
|
|
*/
|
|
void plasma_seal(plasma_store_conn *conn, plasma_id object_id);
|
|
|
|
/**
|
|
* Delete an object from the object store. This currently assumes that the
|
|
* object is present and has been sealed.
|
|
*
|
|
* @todo We may want to allow the deletion of objects that are not present or
|
|
* haven't been sealed.
|
|
*
|
|
* @param conn The object containing the connection state.
|
|
* @param object_id The ID of the object to delete.
|
|
* @return Void.
|
|
*/
|
|
void plasma_delete(plasma_store_conn *conn, plasma_id object_id);
|
|
|
|
#endif
|