dmlite
0.6
|
C wrapper for DMLite Pool API. More...
Go to the source code of this file.
Classes | |
struct | dmlite_pool |
Pool data. More... | |
struct | dmlite_chunk |
Chunk of data. More... | |
struct | dmlite_location |
Collection of chunks that form a replica. More... | |
Defines | |
#define | POOL_TYPE_MAX 16 |
#define | POOL_MAX 16 |
Typedefs | |
typedef struct dmlite_pool | dmlite_pool |
Pool data. | |
typedef struct dmlite_chunk | dmlite_chunk |
Chunk of data. | |
typedef struct dmlite_location | dmlite_location |
Collection of chunks that form a replica. | |
Functions | |
int | dmlite_getpools (dmlite_context *context, unsigned *nPools, dmlite_pool **pools) |
Gets the list of pools. | |
int | dmlite_pools_free (unsigned nPools, dmlite_pool *pools) |
Frees an array of pools. | |
dmlite_location * | dmlite_get (dmlite_context *context, const char *path) |
Gets a single replica (synchronous). | |
dmlite_location * | dmlite_iget (dmlite_context *context, ino_t inode) |
Gets a single replica (synchronous). | |
dmlite_location * | dmlite_getlocation (dmlite_context *context, const dmlite_replica *replica) |
Gets the location of a replica. | |
dmlite_location * | dmlite_put (dmlite_context *context, const char *path) |
Puts a file (synchronous). | |
int | dmlite_put_abort (dmlite_context *context, const dmlite_location *loc) |
Aborts a put request. | |
int | dmlite_location_free (dmlite_location *loc) |
Frees a location struct. |
C wrapper for DMLite Pool API.
#define POOL_MAX 16 |
#define POOL_TYPE_MAX 16 |
typedef struct dmlite_chunk dmlite_chunk |
Chunk of data.
typedef struct dmlite_location dmlite_location |
Collection of chunks that form a replica.
On read, there may be duplicated chunks.
typedef struct dmlite_pool dmlite_pool |
Pool data.
dmlite_location* dmlite_get | ( | dmlite_context * | context, |
const char * | path | ||
) |
Gets a single replica (synchronous).
context | The DM context. |
path | The logical file name. |
dmlite_location* dmlite_getlocation | ( | dmlite_context * | context, |
const dmlite_replica * | replica | ||
) |
Gets the location of a replica.
context | The DM context. |
replica | The replica to translate. |
int dmlite_getpools | ( | dmlite_context * | context, |
unsigned * | nPools, | ||
dmlite_pool ** | pools | ||
) |
Gets the list of pools.
context | The DM context. |
nPools | The number of pools. |
pools | An array with the pools. Use dmlite_freepools to free. |
dmlite_location* dmlite_iget | ( | dmlite_context * | context, |
ino_t | inode | ||
) |
Gets a single replica (synchronous).
context | The DM context. |
inode | The file inode. |
int dmlite_location_free | ( | dmlite_location * | loc | ) |
Frees a location struct.
loc | The struct to free. |
int dmlite_pools_free | ( | unsigned | nPools, |
dmlite_pool * | pools | ||
) |
Frees an array of pools.
nPools | The number of pools in the array. |
pools | The array to free. |
dmlite_location* dmlite_put | ( | dmlite_context * | context, |
const char * | path | ||
) |
Puts a file (synchronous).
context | The DM context. |
path | The logical file name to put. |
int dmlite_put_abort | ( | dmlite_context * | context, |
const dmlite_location * | loc | ||
) |
Aborts a put request.
context | The DM context. |
loc | As returned by dmlite_put. |