Direct hash with base type keys only. More...
#include <db_hash.h>
Public Member Functions | |
| DBHash (int capacity, KT emptyKey, KT deletedKey) | |
| virtual int | hashCode (KT key) |
| virtual bool | match (KT key, KT *slot) |
| virtual bool | isEmptySlot (KT *slot) |
| virtual bool | isDeletedSlot (KT *slot) |
| void | clear () |
| bool | remove (KT key) |
| void | put (KT key) |
| void | put (KT key, hash_slot_t destSlot) |
| bool | exists (KT key) |
| bool | exists (KT key, hash_slot_t *destSlot) |
| void | zero () |
| int | size () |
| int | baseTypeHashCode (unsigned int key) |
| int | secondaryHashCode (int primary) |
| bool | search (KTkey, KT **retSlot) |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Attributes | |
| KT | emptyKey |
| KT | deletedKey |
| int | capacity |
| int | count |
| KT * | data |
| mt_atomic_t | _ref_count |
| pthread_mutex_t | mutex |
Direct hash with base type keys only.
Definition at line 39 of file db_hash.h.
Definition at line 45 of file db_hash.h.
References DBHash< KT >::clear().
| int DHashBase< KT , KT >::baseTypeHashCode | ( | unsigned int | key | ) | [inline, inherited] |
Definition at line 74 of file direct_hash_base.h.
Referenced by DBHash< KT >::hashCode().
| void DBHash< KT >::clear | ( | ) | [inline] |
Definition at line 73 of file db_hash.h.
References DHashBase< KT, KT >::capacity, DHashBase< KT, KT >::count, DHashBase< KT, KT >::data, DBHash< KT >::emptyKey, and DHashBase< KT, KT >::zero().
Referenced by DBHash< KT >::DBHash().
| bool DBHash< KT >::exists | ( | KT | key, | |
| hash_slot_t * | destSlot | |||
| ) | [inline] |
Definition at line 119 of file db_hash.h.
References DHashBase< KT, KT >::search().
| bool DBHash< KT >::exists | ( | KT | key | ) | [inline] |
Definition at line 114 of file db_hash.h.
References DHashBase< KT, KT >::search().
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| virtual int DBHash< KT >::hashCode | ( | KT | key | ) | [inline, virtual] |
Implements DHashBase< KT, KT >.
Definition at line 55 of file db_hash.h.
References DHashBase< KT, KT >::baseTypeHashCode().
| virtual bool DBHash< KT >::isDeletedSlot | ( | KT * | slot | ) | [inline, virtual] |
Reimplemented from DHashBase< KT, KT >.
Definition at line 68 of file db_hash.h.
References DBHash< KT >::deletedKey.
| virtual bool DBHash< KT >::isEmptySlot | ( | KT * | slot | ) | [inline, virtual] |
Implements DHashBase< KT, KT >.
Definition at line 63 of file db_hash.h.
References DBHash< KT >::emptyKey.
| virtual bool DBHash< KT >::match | ( | KT | key, | |
| KT * | slot | |||
| ) | [inline, virtual] |
Implements DHashBase< KT, KT >.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void DBHash< KT >::put | ( | KT | key, | |
| hash_slot_t | destSlot | |||
| ) | [inline] |
Definition at line 104 of file db_hash.h.
References DHashBase< KT, KT >::count, and DBHash< KT >::emptyKey.
| void DBHash< KT >::put | ( | KT | key | ) | [inline] |
Definition at line 95 of file db_hash.h.
References DHashBase< KT, KT >::count, and DHashBase< KT, KT >::search().
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| bool DBHash< KT >::remove | ( | KT | key | ) | [inline] |
Definition at line 85 of file db_hash.h.
References DHashBase< KT, KT >::count, DBHash< KT >::deletedKey, and DHashBase< KT, KT >::search().
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| bool DHashBase< KT , KT >::search | ( | KT | key, | |
| KT ** | retSlot | |||
| ) | [inline, inherited] |
Definition at line 113 of file direct_hash_base.h.
Referenced by DBHash< KT >::exists(), DBHash< KT >::put(), and DBHash< KT >::remove().
| int DHashBase< KT , KT >::secondaryHashCode | ( | int | primary | ) | [inline, inherited] |
Definition at line 103 of file direct_hash_base.h.
| int DHashBase< KT , KT >::size | ( | ) | [inline, inherited] |
Definition at line 60 of file direct_hash_base.h.
| void DHashBase< KT , KT >::zero | ( | ) | [inline, inherited] |
Definition at line 55 of file direct_hash_base.h.
Referenced by DBHash< KT >::clear().
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
Definition at line 41 of file direct_hash_base.h.
Referenced by DBHash< KT >::clear().
Definition at line 42 of file direct_hash_base.h.
Referenced by DBHash< KT >::clear(), DBHash< KT >::put(), and DBHash< KT >::remove().
Definition at line 43 of file direct_hash_base.h.
Referenced by DBHash< KT >::clear().
KT DBHash< KT >::deletedKey [protected] |
Definition at line 43 of file db_hash.h.
Referenced by DBHash< KT >::isDeletedSlot(), and DBHash< KT >::remove().
Definition at line 42 of file db_hash.h.
Referenced by DBHash< KT >::clear(), DBHash< KT >::isEmptySlot(), and DBHash< KT >::put().
pthread_mutex_t zmm::Object::mutex [protected, inherited] |
Reimplemented in AutoscanList, AutoscanInotify, CachedURL, Dictionary_r, DVDNavReader, IOHandlerBufferHelper, ReentrantArray< T >, SingletonManager, Singleton< T >, StorageCache, MutexAutolock, Cond, ThreadExecutor, Singleton< UpdateManager >, Singleton< Timer >, Singleton< ContentDirectoryService >, Singleton< ConfigManager >, Singleton< Server >, Singleton< Runtime >, Singleton< ContentManager >, Singleton< ConnectionManagerService >, Singleton< PlayHook >, Singleton< Storage >, and Singleton< SessionManager >.
Definition at line 56 of file object.h.
Referenced by zmm::Object::Object(), zmm::Object::release(), zmm::Object::retain(), and zmm::Object::~Object().
1.6.1