ESDM
Middleware for Earth System Data
Data Fields
esdm_backend_t_callbacks_t Struct Reference

#include <esdm-datatypes-internal.h>

Data Fields

int(* finalize )(esdm_backend_t *b)
 
int(* performance_estimate )(esdm_backend_t *b, esdm_fragment_t *fragment, float *out_time)
 
float(* estimate_throughput )(esdm_backend_t *b)
 
int(* fragment_create )(esdm_backend_t *b, esdm_fragment_t *fragment)
 
int(* fragment_retrieve )(esdm_backend_t *b, esdm_fragment_t *fragment)
 
int(* fragment_update )(esdm_backend_t *b, esdm_fragment_t *fragment)
 
int(* fragment_delete )(esdm_backend_t *b, esdm_fragment_t *fragment)
 
int(* fragment_metadata_create )(esdm_backend_t *b, esdm_fragment_t *fragment, smd_string_stream_t *stream)
 
void *(* fragment_metadata_load )(esdm_backend_t *b, esdm_fragment_t *fragment, json_t *metadata)
 
int(* fragment_metadata_free )(esdm_backend_t *b, void *options)
 
int(* mkfs )(esdm_backend_t *b, int format_flags)
 
int(* fsck )(esdm_backend_t *b)
 
int(* fragment_write_stream_blocksize )(esdm_backend_t *b, estream_write_t *state, void *cur_buf, size_t cur_offset, uint64_t cur_size)
 

Detailed Description

finalize: before ESDM exits, it will call the finalize function for every module

performance_estimate:

Notes:

Field Documentation

◆ fragment_write_stream_blocksize

int(* esdm_backend_t_callbacks_t::fragment_write_stream_blocksize) (esdm_backend_t *b, estream_write_t *state, void *cur_buf, size_t cur_offset, uint64_t cur_size)

Write a fragment by streaming it piecemeal.

Parameters
[in]backendthe backend object
[in,out]statethe caller sets the fragment member, and then reuses the state object for further calls unchanged
[in]cur_bufpointer to the first byte that is to be written by this call
[in]cur_offsetlogical offset to the first byte in cur_buf within the fragment, this is used to select whether the stream is being set up, streamed to, or torn down
[in]cur_sizecount of bytes to be streamed by this call

For proper operation, cur_offset must be 0 on the first call, and cur_offset + cur_size must be equal the size of the fragment on the last call. Intermediate call must satisfy neither condition.

the expected blocksize for streaming is stored inside the backend configuration


The documentation for this struct was generated from the following file: