/usr/lib/emboss/include/enscache.h is in emboss-lib 6.3.1-6ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | #ifdef __cplusplus
extern "C"
{
#endif
#ifndef enscache_h
#define enscache_h
#include "ajax.h"
#include "enstable.h"
/* EnsECacheType **************************************************************
**
** Ensembl Cache Type enumeration.
**
******************************************************************************/
typedef enum EnsOCacheType
{
ensECacheTypeNULL,
ensECacheTypeNumeric,
ensECacheTypeAlphaNumeric
} EnsECacheType;
/* @data EnsPCache ************************************************************
**
** Ensembl Cache.
**
** @alias EnsSCache
** @alias EnsOCache
**
** @attr Label [AjPStr] Cache label for statistics output
** @attr List [AjPList] AJAX List implementing LRU functionality
** @attr Table [AjPTable] AJAX Table implementing lookup functionality
** @attr Reference [(void**)] Object-specific referencing function
** @attr Delete [(void*)] Object-specific deletion function
** @attr Size [(ajulong*)] Object-specific memory sizing function
** @attr Read [(void**)] Object-specific reading function
** @attr Write [(AjBool*)] Object-specific writing function
** @attr Type [EnsECacheType] Ensembl Cache type
** @attr Synchron [AjBool] ajTrue: Immediately write-back value data
** ajFalse: Write-back value data later
** @cc Cache limits
** @attr Bytes [ajulong] Current number of cached bytes
** @attr MaxBytes [ajulong] Maximum number of allowed bytes
** @attr MaxSize [ajulong] Maximum memory size of an object
** @cc Cache size
** @attr Count [ajuint] Current number of cached entry
** @attr MaxCount [ajuint] Maximum number of allowed entries
** @cc Cache performance statistics
** @attr Dropped [ajuint] Number of entries dropped by the LRU algorithm
** @attr Removed [ajuint] Number of entries explicitly removed
** @attr Stored [ajuint] Number of entries currently stored
** @attr Hit [ajuint] Number of cache hits
** @attr Miss [ajuint] Number of cache misses
** @@
******************************************************************************/
typedef struct EnsSCache
{
AjPStr Label;
AjPList List;
AjPTable Table;
void* (*Reference)(void *);
void (*Delete)(void **);
ajulong (*Size)(const void *);
void* (*Read)(const void *key);
AjBool (*Write)(const void *);
EnsECacheType Type;
AjBool Synchron;
ajulong Bytes;
ajulong MaxBytes;
ajulong MaxSize;
ajuint Count;
ajuint MaxCount;
ajuint Dropped;
ajuint Removed;
ajuint Stored;
ajuint Hit;
ajuint Miss;
} EnsOCache;
#define EnsPCache EnsOCache*
/*
** Prototype definitions
*/
/* Ensembl Cache */
EnsPCache ensCacheNew(EnsECacheType type,
ajulong maxbytes,
ajuint maxcount,
ajulong maxsize,
void* Freference(void* value),
void Fdelete(void** value),
ajulong Fsize(const void* value),
void* Fread(const void* key),
AjBool Fwrite(const void* value),
AjBool synchron,
const char *label);
void ensCacheDel(EnsPCache* Pcache);
void *ensCacheFetch(EnsPCache cache, void *key);
AjBool ensCacheStore(EnsPCache cache, void* key, void** value);
AjBool ensCacheRemove(EnsPCache cache, const void* key);
AjBool ensCacheSynchronise(EnsPCache cache);
AjBool ensCacheTrace(const EnsPCache cache, ajuint level);
/*
** End of prototype definitions
*/
#endif /* enscache_h */
#ifdef __cplusplus
}
#endif
|