Lines Matching defs:key
59 * Entry key
67 has_entry_expired(map_ctrl *map, datum *key)
78 /* Get expiry time entry for key */
79 ttl = dbm_fetch(map->ttl, *key);
83 * If we failed to get a map expiry key, which must always be
87 if ((key->dsize == strlen(MAP_EXPIRY_KEY)) &&
88 (0 == strncmp(key->dptr, MAP_EXPIRY_KEY, key->dsize))) {
113 * Need to malloc some memory before can syslog the key name
118 "Invalid TTL key in map %s. error %d",
121 /* Log the key name */
122 key_name = (char *)am(myself, key->dsize + 1);
127 strncpy(key_name, key->dptr, key->dsize);
128 key_name[key->dsize] = '\0';
163 datum key;
165 /* Set up datum with magic expiry key */
166 key.dsize = strlen(MAP_EXPIRY_KEY);
167 key.dptr = MAP_EXPIRY_KEY;
169 /* Call has_entry_expired() with magic map expiry key */
170 return (has_entry_expired(map, &key));
179 * Entry key
188 update_entry_ttl(map_ctrl *map, datum *key, TTL_TYPE type)
207 /* Set expiry time entry for key */
209 if (0 > dbm_store(map->ttl, *key, expire, DBM_REPLACE)) {
238 datum key;
242 /* Set up datum with magic expiry key */
243 key.dsize = strlen(MAP_EXPIRY_KEY);
244 key.dptr = MAP_EXPIRY_KEY;
254 /* Call update_entry_ttl() with magic map expiry key */
255 ret = update_entry_ttl(map, &key, TTL_MIN);