CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmcache_callbacks Struct Reference

#include <libcvmfs_cache.h>

Public Attributes

int(* cvmcache_chrefcnt )(struct cvmcache_hash *id, int32_t change_by)
 
int(* cvmcache_obj_info )(struct cvmcache_hash *id, struct cvmcache_object_info *info)
 
int(* cvmcache_pread )(struct cvmcache_hash *id, uint64_t offset, uint32_t *size, unsigned char *buffer)
 
int(* cvmcache_start_txn )(struct cvmcache_hash *id, uint64_t txn_id, struct cvmcache_object_info *info)
 
int(* cvmcache_write_txn )(uint64_t txn_id, unsigned char *buffer, uint32_t size)
 
int(* cvmcache_commit_txn )(uint64_t txn_id)
 
int(* cvmcache_abort_txn )(uint64_t txn_id)
 
int(* cvmcache_info )(struct cvmcache_info *info)
 
int(* cvmcache_shrink )(uint64_t shrink_to, uint64_t *used)
 
int(* cvmcache_listing_begin )(uint64_t lst_id, enum cvmcache_object_type type)
 
int(* cvmcache_listing_next )(int64_t lst_id, struct cvmcache_object_info *item)
 
int(* cvmcache_listing_end )(int64_t lst_id)
 
int(* cvmcache_breadcrumb_store )(const char *fqrn, const cvmcache_breadcrumb *breadcrumb)
 
int(* cvmcache_breadcrumb_load )(const char *fqrn, cvmcache_breadcrumb *breadcrumb)
 
int capabilities
 

Detailed Description

According to capabilities, some of the callbacks can be NULL

Definition at line 126 of file libcvmfs_cache.h.

Member Data Documentation

int cvmcache_callbacks::capabilities
int(* cvmcache_callbacks::cvmcache_abort_txn)(uint64_t txn_id)
int(* cvmcache_callbacks::cvmcache_breadcrumb_load)(const char *fqrn, cvmcache_breadcrumb *breadcrumb)
int(* cvmcache_callbacks::cvmcache_breadcrumb_store)(const char *fqrn, const cvmcache_breadcrumb *breadcrumb)
int(* cvmcache_callbacks::cvmcache_chrefcnt)(struct cvmcache_hash *id, int32_t change_by)

Returns CVMCACHE_STATUS_OK or CVMCACHE_STATUS_BADCOUNT if objects reference counter would fall below zero.

Definition at line 131 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_commit_txn)(uint64_t txn_id)

Only as of commit the object must appear to other clients.

Definition at line 160 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_info)(struct cvmcache_info *info)
int(* cvmcache_callbacks::cvmcache_listing_begin)(uint64_t lst_id, enum cvmcache_object_type type)

Listing can be "approximate", e.g. if files are removed and/or addded in the meantime, this may or may not be reflected.

Definition at line 169 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_listing_end)(int64_t lst_id)
int(* cvmcache_callbacks::cvmcache_listing_next)(int64_t lst_id, struct cvmcache_object_info *item)
int(* cvmcache_callbacks::cvmcache_obj_info)(struct cvmcache_hash *id, struct cvmcache_object_info *info)

Needs to fill only the size of the object.

Definition at line 135 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_pread)(struct cvmcache_hash *id, uint64_t offset, uint32_t *size, unsigned char *buffer)

Returns CVMCACHE_STATUS_OUTOFBOUNDS if offset is larger than file size. Otherwise must work if object's reference counter is larger than zero.

Definition at line 141 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_shrink)(uint64_t shrink_to, uint64_t *used)
int(* cvmcache_callbacks::cvmcache_start_txn)(struct cvmcache_hash *id, uint64_t txn_id, struct cvmcache_object_info *info)

The same object might be uploaded concurrently by multiple users.

Definition at line 148 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().

int(* cvmcache_callbacks::cvmcache_write_txn)(uint64_t txn_id, unsigned char *buffer, uint32_t size)

A full block is appended except possibly for the file's last block

Definition at line 154 of file libcvmfs_cache.h.

Referenced by anonymous_namespace{libcvmfs_cache.cc}::ForwardCachePlugin::ForwardCachePlugin(), and main().


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