args-read-actions.h 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
/*
 * (C) 2017 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */
#ifndef __MOBJECT_ARGS_READ_ACTION_H
#define __MOBJECT_ARGS_READ_ACTION_H

#include "mobject-store-config.h"
#include "read-actions.h"

/**
 * This file contains a set of structures meant
 * to store arguments for write_op operations in
 * a buffer. Some of these structures are self-sufficiant.
 * Some other are meant to be used as headers, and the
 * the serialized buffer actually contains additional
 * data after them.
 */

/**
 * stat operation
 * no header (so no defined structure)
 * no extra data
 */
// typedef struct args_rd_action_STAT {
// } args_rd_action_stat;

/**
 * read operation
 * no extra data
 */
typedef struct args_rd_action_READ {
	uint64_t              offset;
	size_t                len;
	uint64_t              bulk_offset;
} args_rd_action_read;

/**
 * omap_get_keys operation
 * extra data contains the start_after string
 * (see read-actions.h)
 */
typedef struct args_rd_action_OMAP_GET_KEYS {
    uint64_t              max_return;
	size_t                data_size;
} args_rd_action_omap_get_keys;

/**
 * omap_get_vals operation
 * extra data contains the start_after and
 * filter_prefix strings
 * (see read-actions.h)
 */
typedef struct args_rd_action_OMAP_GET_VALS {
    uint64_t              max_return;
	size_t                data_size;
} args_rd_action_omap_get_vals;

/**
 * omap_get_vals_by_keys operation
 * extra data contains the list of null-terminated
 * keys; the total size of the extra data in bytes is
 * in data_size
 */
typedef struct args_rd_action_OMAP_GET_VALS_BY_KEYS {
    size_t                num_keys;
	size_t                data_size;
} args_rd_action_omap_get_vals_by_keys;

#endif