All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
modules/common/target/Linux-x86_64/include/aerospike/as_hashmap.h File Reference
#include <aerospike/as_map.h>
#include <stdbool.h>
#include <stdint.h>
+ Include dependency graph for modules/common/target/Linux-x86_64/include/aerospike/as_hashmap.h:

Go to the source code of this file.

Data Structures

struct  as_hashmap
 

Functions

int as_hashmap_clear (as_hashmap *map)
 
void as_hashmap_destroy (as_hashmap *map)
 
bool as_hashmap_foreach (const as_hashmap *map, as_map_foreach_callback callback, void *udata)
 
as_valas_hashmap_get (const as_hashmap *map, const as_val *key)
 
uint32_t as_hashmap_hashcode (const as_hashmap *map)
 
as_hashmapas_hashmap_init (as_hashmap *map, uint32_t buckets)
 
as_hashmapas_hashmap_new (uint32_t buckets)
 
int as_hashmap_remove (as_hashmap *map, const as_val *key)
 
int as_hashmap_set (as_hashmap *map, const as_val *key, const as_val *val)
 
uint32_t as_hashmap_size (const as_hashmap *map)
 

Function Documentation

int as_hashmap_clear ( as_hashmap map)

Remove all entries from the map.

Parameters
mapThe map.
Returns
0 on success. Otherwise an error occurred.
void as_hashmap_destroy ( as_hashmap map)

Free the map and associated resources.

Parameters
mapThe map to destroy.
bool as_hashmap_foreach ( const as_hashmap map,
as_map_foreach_callback  callback,
void *  udata 
)

Call the callback function for each entry in the map.

Parameters
mapThe map.
callbackThe function to call for each entry.
udataUser-data to be passed to the callback.
Returns
true if iteration completes fully. false if iteration was aborted.
as_val* as_hashmap_get ( const as_hashmap map,
const as_val key 
)

Get the value for specified key.

Parameters
mapThe map.
keyThe key.
Returns
The value for the specified key. Otherwise NULL.
uint32_t as_hashmap_hashcode ( const as_hashmap map)

The hash value of the map.

Parameters
mapThe map.
Returns
The hash value of the map.
as_hashmap* as_hashmap_init ( as_hashmap map,
uint32_t  buckets 
)

Initialize a stack allocated hashmap.

Parameters
mapThe map to initialize.
bucketsThe number of hash buckets to allocate.
Returns
On success, the initialized map. Otherwise NULL.
as_hashmap* as_hashmap_new ( uint32_t  buckets)

Creates a new map as a hashmap.

Parameters
bucketsThe number of hash buckets to allocate.
Returns
On success, the new map. Otherwise NULL.
int as_hashmap_remove ( as_hashmap map,
const as_val key 
)

Remove the entry specified by the key.

Parameters
mapThe map to remove the entry from.
keyThe key of the entry to be removed.
Returns
0 on success. Otherwise an error occurred.
int as_hashmap_set ( as_hashmap map,
const as_val key,
const as_val val 
)

Set the value for specified key.

Parameters
mapThe map.
keyThe key.
valThe value for the given key.
Returns
0 on success. Otherwise an error occurred.
uint32_t as_hashmap_size ( const as_hashmap map)

Get the number of entries in the map.

Parameters
mapThe map.
Returns
The number of entries in the map.