Home
last modified time | relevance | path

Searched refs:dict (Results 1 – 25 of 29) sorted by relevance

12

/redis-3.2.3/src/
H A Ddict.h76 typedef struct dict { struct
82 } dict; argument
89 dict *d;
152 int dictAdd(dict *d, void *key, void *val);
153 dictEntry *dictAddRaw(dict *d, void *key);
156 int dictDelete(dict *d, const void *key);
158 void dictRelease(dict *d);
161 int dictResize(dict *d);
162 dictIterator *dictGetIterator(dict *d);
166 dictEntry *dictGetRandomKey(dict *d);
[all …]
H A Ddict.c63 static int _dictExpandIfNeeded(dict *ht);
168 dict *dictCreate(dictType *type, in dictCreate()
171 dict *d = zmalloc(sizeof(*d)); in dictCreate()
178 int _dictInit(dict *d, dictType *type, in _dictInit()
192 int dictResize(dict *d) in dictResize()
245 int dictRehash(dict *d, int n) { in dictRehash()
317 static void _dictRehashStep(dict *d) { in _dictRehashStep()
485 void dictRelease(dict *d) in dictRelease()
526 long long dictFingerprint(dict *d) { in dictFingerprint()
626 dictEntry *dictGetRandomKey(dict *d) in dictGetRandomKey()
[all …]
H A DMakefile.dep9 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
14 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
19 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
23 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
27 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
32 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
37 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
42 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
47 ../deps/lua/src/lua.h ../deps/lua/src/luaconf.h ae.h sds.h dict.h \
51 dict.o: dict.c fmacros.h dict.h zmalloc.h redisassert.h
[all …]
H A Ddb.c48 dictEntry *de = dictFind(db->dict,key->ptr); in lookupKey()
159 int retval = dictAdd(db->dict, copy, val); in dbAdd()
175 dictReplace(db->dict, key->ptr, val); in dbOverwrite()
210 de = dictGetRandomKey(db->dict); in dbRandomKey()
318 server.dirty += dictSize(c->db->dict); in flushdbCommand()
320 dictEmpty(c->db->dict,NULL); in flushdbCommand()
411 di = dictGetSafeIterator(c->db->dict); in keysCommand()
498 dict *ht; in scanGenericCommand()
550 ht = c->db->dict; in scanGenericCommand()
558 ht = zs->dict; in scanGenericCommand()
[all …]
H A Dt_zset.c292 unsigned long zslDeleteRangeByScore(zskiplist *zsl, zrangespec *range, dict *dict) { in zslDeleteRangeByScore() argument
315 dictDelete(dict,x->obj); in zslDeleteRangeByScore()
323 unsigned long zslDeleteRangeByLex(zskiplist *zsl, zlexrangespec *range, dict *dict) { in zslDeleteRangeByLex() argument
344 dictDelete(dict,x->obj); in zslDeleteRangeByLex()
354 unsigned long zslDeleteRangeByRank(zskiplist *zsl, unsigned int start, unsigned int end, dict *dict… in zslDeleteRangeByRank() argument
373 dictDelete(dict,x->obj); in zslDeleteRangeByRank()
1146 dictRelease(zs->dict); in zsetConvert()
1449 if (htNeedsResize(zs->dict)) dictResize(zs->dict); in zremCommand()
1551 if (htNeedsResize(zs->dict)) dictResize(zs->dict); in zremrangeGenericCommand()
1601 dict *dict; member
[all …]
H A Dserver.h505 dict *dict; /* The keyspace for this DB */ member
506 dict *expires; /* Timeout of keys with a timeout set */
508 dict *ready_keys; /* Blocked keys that received a PUSH */
509 dict *watched_keys; /* WATCHED keys for MULTI/EXEC CAS */
656 dict *dict; member
712 dict *commands; /* Command table */
744 dict *migrate_cached_sockets;/* MIGRATE cached sockets */
903 dict *repl_scriptcache_dict; /* SHA1 all slaves are aware of. */
955 dict *lua_scripts; /* A dictionary of SHA1 -> Lua scripts */
971 dict *latency_events;
[all …]
H A Dobject.c199 dict *d = dictCreate(&setDictType,NULL); in createSetObject()
223 zs->dict = dictCreate(&zsetDictType,NULL); in createZsetObject()
256 dictRelease((dict*) o->ptr); in freeSetObject()
271 dictRelease(zs->dict); in freeZsetObject()
286 dictRelease((dict*) o->ptr); in freeHashObject()
697 if ((de = dictFind(c->db->dict,key->ptr)) == NULL) return NULL; in objectCommandLookup()
H A Drdb.c604 dict *set = o->ptr; in rdbSaveObject()
634 dictIterator *di = dictGetIterator(zs->dict); in rdbSaveObject()
637 if ((n = rdbSaveLen(rdb,dictSize(zs->dict))) == -1) return -1; in rdbSaveObject()
665 if ((n = rdbSaveLen(rdb,dictSize((dict*)o->ptr))) == -1) return -1; in rdbSaveObject()
778 dict *d = db->dict; in rdbSaveRio()
792 db_size = (dictSize(db->dict) <= UINT32_MAX) ? in rdbSaveRio()
793 dictSize(db->dict) : in rdbSaveRio()
1035 dictAdd((dict*)o->ptr,ele,NULL); in rdbLoadObject()
1065 dictAdd(zs->dict,ele,&znode->score); in rdbLoadObject()
1130 ret = dictAdd((dict*)o->ptr, field, value); in rdbLoadObject()
[all …]
H A Dt_hash.c269 if (dictDelete((dict*)o->ptr, field) == C_OK) { in hashTypeDelete()
290 length = dictSize((dict*)o->ptr); in hashTypeLength()
440 dict *dict; in hashTypeConvertZiplist() local
444 dict = dictCreate(&hashDictType, NULL); in hashTypeConvertZiplist()
453 ret = dictAdd(dict, field, value); in hashTypeConvertZiplist()
465 o->ptr = dict; in hashTypeConvertZiplist()
H A Dcluster.h113 dict *nodes; /* Hash table of name -> clusterNode structures */
114 dict *nodes_black_list; /* Nodes we don't re-add for a few seconds. */
H A Dserver.c662 int htNeedsResize(dict *dict) { in htNeedsResize() argument
665 size = dictSlots(dict); in htNeedsResize()
666 used = dictSize(dict); in htNeedsResize()
674 if (htNeedsResize(server.db[dbid].dict)) in tryResizeHashTables()
675 dictResize(server.db[dbid].dict); in tryResizeHashTables()
3383 void evictionPoolPopulate(dict *sampledict, dict *keydict, struct evictionPoolEntry *pool) { in evictionPoolPopulate()
3493 dict *dict; in freeMemoryIfNeeded() local
3498 dict = server.db[j].dict; in freeMemoryIfNeeded()
3500 dict = server.db[j].expires; in freeMemoryIfNeeded()
3508 de = dictGetRandomKey(dict); in freeMemoryIfNeeded()
[all …]
H A Ddebug.c126 if (dictSize(db->dict) == 0) continue; in computeDatasetDigest()
127 di = dictGetIterator(db->dict); in computeDatasetDigest()
207 dictIterator *di = dictGetIterator(zs->dict); in computeDatasetDigest()
361 if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) { in debugCommand()
413 if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) { in debugCommand()
439 dictExpand(c->db->dict,keys); in debugCommand()
515 dictGetStats(buf,sizeof(buf),server.db[dbid].dict); in debugCommand()
898 de = dictFind(cc->db->dict, key->ptr); in logCurrentClient()
H A Dsort.c312 case OBJ_ZSET: vectorlen = dictSize(((zset*)sortval->ptr)->dict); break; in sortCommand()
407 long zsetlen = dictSize(((zset*)sortval->ptr)->dict); in sortCommand()
431 dict *set = ((zset*)sortval->ptr)->dict; in sortCommand()
H A Dsentinel.c191 dict *sentinels; /* Other sentinels monitoring the same master. */
192 dict *slaves; /* Slaves for this master instance. */
231 dict *masters; /* Dictionary of master sentinelRedisInstances.
1148 dict *table = NULL; in createSentinelRedisInstance()
1552 dict *d[] = {master->slaves, master->sentinels, NULL}; in sentinelPropagateDownAfterPeriod()
2507 void sentinelForceHelloUpdateDictOfRedisInstances(dict *instances) { in sentinelForceHelloUpdateDictOfRedisInstances()
2827 void addReplyDictOfRedisInstances(client *c, dict *instances) { in addReplyDictOfRedisInstances()
3110 dict *masters_local = sentinel.masters; in sentinelCommand()
3642 int sentinelLeaderIncr(dict *counters, char *runid) { in sentinelLeaderIncr()
3665 dict *counters; in sentinelGetLeader()
[all …]
H A Dt_set.c110 return dictFind((dict*)subject->ptr,value) != NULL; in setTypeIsMember()
231 return dictSize((dict*)subject->ptr); in setTypeSize()
249 dict *d = dictCreate(&setDictType,NULL); in setTypeConvert()
630 dict *d; in srandmemberWithCountCommand()
H A Dmulti.c300 if (dictFind(wk->db->dict, wk->key->ptr) != NULL) in touchWatchedKeysOnFlush()
H A Daof.c908 dictIterator *di = dictGetIterator(zs->dict); in rewriteSortedSetObject()
1042 dict *d = db->dict; in rewriteAppendOnlyFile()
H A DMakefile120 REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o p…
/redis-3.2.3/deps/hiredis/
H A Ddict.h60 typedef struct dict { struct
67 } dict; typedef
70 dict *ht;
115 static dict *dictCreate(dictType *type, void *privDataPtr);
116 static int dictExpand(dict *ht, unsigned long size);
117 static int dictAdd(dict *ht, void *key, void *val);
118 static int dictReplace(dict *ht, void *key, void *val);
119 static int dictDelete(dict *ht, const void *key);
120 static void dictRelease(dict *ht);
121 static dictEntry * dictFind(dict *ht, const void *key);
[all …]
H A Ddict.c44 static int _dictExpandIfNeeded(dict *ht);
46 static int _dictKeyIndex(dict *ht, const void *key);
65 static void _dictReset(dict *ht) { in _dictReset()
74 dict *ht = malloc(sizeof(*ht)); in dictCreate()
89 dict n; /* the new hashtable */ in dictExpand()
135 static int dictAdd(dict *ht, void *key, void *val) { in dictAdd()
182 static int dictDelete(dict *ht, const void *key) { in dictDelete()
213 static int _dictClear(dict *ht) { in _dictClear()
238 static void dictRelease(dict *ht) { in dictRelease()
258 static dictIterator *dictGetIterator(dict *ht) { in dictGetIterator()
[all …]
H A Dasync.h41 struct dict; /* dictionary header is included in async.c */
98 struct dict *channels;
99 struct dict *patterns;
H A DMakefile61 async.o: async.c async.h hiredis.h sds.h dict.c dict.h
H A Dasync.c355 dict *callbacks; in __redisGetSubscribeCallback()
/redis-3.2.3/utils/hashtable/
H A Drehashing.c48 void show(dict *d) { in show()
71 void stressGetKeys(dict *d, int times, int *perfect_run, int *approx_run) { in stressGetKeys()
102 dict *d = dictCreate(&dictTypeTest,NULL); in main()
H A DREADME13 cc -I ../../src/ rehashing.c ../../src/zmalloc.c ../../src/dict.c -o rehashing_test

12