Turnstone Operating System
Loading...
Searching...
No Matches
tosdb_cache.h File Reference

tosdb cache interface More...

#include <types.h>
#include <tosdb/tosdb.h>
#include <buffer.h>
#include <bloomfilter.h>

Classes

struct  tosdb_cache_key_t
 tosdb cache key More...
 
struct  tosdb_cached_bloomfilter_t
 tosdb boomfilter cache item More...
 
struct  tosdb_cached_index_data_t
 tosdb index data cache item it is for primary/unique index More...
 
struct  tosdb_cached_secondary_index_data_t
 tosdb secondary index data cache item More...
 
struct  tosdb_cached_valuelog_t
 tosdb valuelog cache item More...
 

Macros

#define ___TOSDB_TOSDB_CACHE_H   0
 

Typedefs

typedef enum tosdb_cache_item_type_t tosdb_cache_item_type_t
 tosdb cache item type
 
typedef struct tosdb_memtable_index_item_t tosdb_memtable_index_item_t
 opaque tosdb memtable index item
 
typedef struct tosdb_memtable_secondary_index_item_t tosdb_memtable_secondary_index_item_t
 opaque tosdb memtable secondary index item
 
typedef struct tosdb_cache_key_t tosdb_cache_key_t
 tosdb cache key
 
typedef struct tosdb_cached_bloomfilter_t tosdb_cached_bloomfilter_t
 tosdb boomfilter cache item
 
typedef struct tosdb_cached_index_data_t tosdb_cached_index_data_t
 tosdb index data cache item
 
typedef struct tosdb_cached_secondary_index_data_t tosdb_cached_secondary_index_data_t
 tosdb secondary index data cache item
 
typedef struct tosdb_cached_valuelog_t tosdb_cached_valuelog_t
 tosdb valuelog cache item
 
typedef struct tosdb_cache_t tosdb_cache_t
 opaque tosdb cache
 

Enumerations

enum  tosdb_cache_item_type_t { TOSDB_CACHE_ITEM_TYPE_BLOOMFILTER , TOSDB_CACHE_ITEM_TYPE_INDEX_DATA , TOSDB_CACHE_ITEM_TYPE_SECONDARY_INDEX_DATA , TOSDB_CACHE_ITEM_TYPE_VALUELOG }
 tosdb cache item type More...
 

Functions

tosdb_cache_ttosdb_cache_new (tosdb_cache_config_t *config)
 creates new tosdb cache More...
 
boolean_t tosdb_cache_close (tosdb_cache_t *cache)
 deletes tosdb cache More...
 
const tosdb_cache_key_ttosdb_cache_get (tosdb_cache_t *cache, tosdb_cache_key_t *key)
 gets tosdb cache item More...
 
boolean_t tosdb_cache_put (tosdb_cache_t *cache, tosdb_cache_key_t *key)
 puts tosdb cache item More...
 

Detailed Description

tosdb cache interface

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Macro Definition Documentation

◆ ___TOSDB_TOSDB_CACHE_H

#define ___TOSDB_TOSDB_CACHE_H   0

macro for preventing second time include

Enumeration Type Documentation

◆ tosdb_cache_item_type_t

tosdb cache item type

Enumerator
TOSDB_CACHE_ITEM_TYPE_BLOOMFILTER 

bloomfilter

TOSDB_CACHE_ITEM_TYPE_INDEX_DATA 

index data

TOSDB_CACHE_ITEM_TYPE_SECONDARY_INDEX_DATA 

secondary index data

TOSDB_CACHE_ITEM_TYPE_VALUELOG 

valuelog

Function Documentation

◆ tosdb_cache_close()

boolean_t tosdb_cache_close ( tosdb_cache_t cache)

deletes tosdb cache

Parameters
cachetosdb cache
Returns
true if success, false otherwise

◆ tosdb_cache_get()

const tosdb_cache_key_t * tosdb_cache_get ( tosdb_cache_t cache,
tosdb_cache_key_t key 
)

gets tosdb cache item

Parameters
cachetosdb cache
keycache key
Returns
tosdb cache item if success, NULL otherwise

◆ tosdb_cache_new()

tosdb_cache_t * tosdb_cache_new ( tosdb_cache_config_t config)

creates new tosdb cache

Parameters
configcache config
Returns
tosdb cache if success, NULL otherwise

◆ tosdb_cache_put()

boolean_t tosdb_cache_put ( tosdb_cache_t cache,
tosdb_cache_key_t key 
)

puts tosdb cache item

Parameters
cachetosdb cache
keycache key
Returns
true if success, false otherwise