#ifndef ASSOC_H
#define ASSOC_H

struct assoc {
   /* how many powers of 2's worth of buckets we use */
   unsigned int hashpower;


   /* Main hash table. This is where we look except during expansion. */
   hash_item** primary_hashtable;

   /*
    * Previous hash table. During expansion, we look here for keys that haven't
    * been moved over to the primary yet.
    */
   hash_item** old_hashtable;

   /* Number of items in the hash table. */
   unsigned int hash_items;

   /* Flag: Are we in the middle of expanding now? */
   bool expanding;

   /*
    * During expansion we migrate values with bucket granularity; this is how
    * far we've gotten so far. Ranges from 0 .. hashsize(hashpower - 1) - 1.
    */
   unsigned int expand_bucket;


   /*
    * serialise access to the hashtable
    */
   cb_mutex_t lock;
};

/* associative array */
ENGINE_ERROR_CODE assoc_init(struct default_engine *engine);
void assoc_destroy(void);
hash_item *assoc_find(struct default_engine *engine, uint32_t hash,
                      const hash_key* key);
int assoc_insert(struct default_engine *engine, uint32_t hash,
                 hash_item *item);
void assoc_delete(struct default_engine *engine, uint32_t hash,
                  const hash_key* key);
int start_assoc_maintenance_thread(struct default_engine *engine);
void stop_assoc_maintenance_thread(struct default_engine *engine);

#endif

#ifndef ASSOC_H
#define ASSOC_H

struct assoc {
   /* how many powers of 2's worth of buckets we use */
   unsigned int hashpower;


   /* Main hash table. This is where we look except during expansion. */
   hash_item** primary_hashtable;

   /*
    * Previous hash table. During expansion, we look here for keys that haven't
    * been moved over to the primary yet.
    */
   hash_item** old_hashtable;

   /* Number of items in the hash table. */
   unsigned int hash_items;

   /* Flag: Are we in the middle of expanding now? */
   bool expanding;

   /*
    * During expansion we migrate values with bucket granularity; this is how
    * far we've gotten so far. Ranges from 0 .. hashsize(hashpower - 1) - 1.
    */
   unsigned int expand_bucket;


   /*
    * serialise access to the hashtable
    */
   cb_mutex_t lock;
};

/* associative array */
ENGINE_ERROR_CODE assoc_init(struct default_engine *engine);
void assoc_destroy(void);
hash_item *assoc_find(struct default_engine *engine, uint32_t hash,
                      const hash_key* key);
int assoc_insert(struct default_engine *engine, uint32_t hash,
                 hash_item *item);
void assoc_delete(struct default_engine *engine, uint32_t hash,
                  const hash_key* key);

#endif

Remove prototypes for nonexistent functions
Remove prototypes for nonexistent functions

Change-Id: Ife8b66f32aa78159ea3cfdec17cbc5148d954f8d
Reviewed-on: http://review.couchbase.org/80561
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Jim Walker <1cd02e31b43620d7c664e038ca42a060d61727b9@couchbase.com>
