direct hash with string keys and object ("Ref") values More...
#include <dso_hash.h>
Public Member Functions | |
| DSOHash (int capacity) | |
| virtual | ~DSOHash () |
| virtual int | hashCode (zmm::String key) |
| virtual bool | match (zmm::String key, struct dso_hash_slot< VT > *slot) |
| virtual bool | isEmptySlot (struct dso_hash_slot< VT > *slot) |
| virtual bool | isDeletedSlot (struct dso_hash_slot< VT > *slot) |
| void | clear () |
| bool | remove (zmm::String key) |
| void | put (zmm::String key, zmm::Ref< VT > value) |
| void | put (zmm::String key, hash_slot_t destSlot, zmm::Ref< VT > value) |
| zmm::Ref< VT > | get (zmm::String key) |
| zmm::Ref< VT > | get (zmm::String key, hash_slot_t *destSlot) |
| void | zero () |
| int | size () |
| int | baseTypeHashCode (unsigned int key) |
| int | secondaryHashCode (int primary) |
| bool | search (zmm::Stringkey, struct dso_hash_slot< VT > **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 Member Functions | |
| void | releaseData () |
Protected Attributes | |
| zmm::StringBase * | deletedKey |
| int | capacity |
| int | count |
| struct dso_hash_slot< VT > * | data |
| mt_atomic_t | _ref_count |
| pthread_mutex_t | mutex |
direct hash with string keys and object ("Ref") values
Definition at line 46 of file dso_hash.h.
Definition at line 49 of file dso_hash.h.
Definition at line 54 of file dso_hash.h.
| int DHashBase< zmm::String , struct dso_hash_slot< VT > >::baseTypeHashCode | ( | unsigned int | key | ) | [inline, inherited] |
Definition at line 74 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::hashCode().
| void DSOHash< VT >::clear | ( | ) | [inline] |
Definition at line 94 of file dso_hash.h.
| zmm::Ref<VT> DSOHash< VT >::get | ( | zmm::String | key, | |
| hash_slot_t * | destSlot | |||
| ) | [inline] |
Definition at line 153 of file dso_hash.h.
| zmm::Ref<VT> DSOHash< VT >::get | ( | zmm::String | key | ) | [inline] |
Definition at line 141 of file dso_hash.h.
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| virtual int DSOHash< VT >::hashCode | ( | zmm::String | key | ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.
Definition at line 77 of file dso_hash.h.
| virtual bool DSOHash< VT >::isDeletedSlot | ( | struct dso_hash_slot< VT > * | slot | ) | [inline, virtual] |
Reimplemented from DHashBase< zmm::String, struct dso_hash_slot< VT > >.
Definition at line 89 of file dso_hash.h.
| virtual bool DSOHash< VT >::isEmptySlot | ( | struct dso_hash_slot< VT > * | slot | ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.
Definition at line 85 of file dso_hash.h.
| virtual bool DSOHash< VT >::match | ( | zmm::String | key, | |
| struct dso_hash_slot< VT > * | slot | |||
| ) | [inline, virtual] |
Implements DHashBase< zmm::String, struct dso_hash_slot< VT > >.
Definition at line 81 of file dso_hash.h.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| void DSOHash< VT >::put | ( | zmm::String | key, | |
| hash_slot_t | destSlot, | |||
| zmm::Ref< VT > | value | |||
| ) | [inline] |
Definition at line 118 of file dso_hash.h.
| void DSOHash< VT >::put | ( | zmm::String | key, | |
| zmm::Ref< VT > | value | |||
| ) | [inline] |
Definition at line 112 of file dso_hash.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::put().
| 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().
| void DSOHash< VT >::releaseData | ( | ) | [inline, protected] |
Definition at line 63 of file dso_hash.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::clear(), and DSOHash< zmm::Array< CacheObject > >::~DSOHash().
| bool DSOHash< VT >::remove | ( | zmm::String | key | ) | [inline] |
Definition at line 100 of file dso_hash.h.
| 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< zmm::String , struct dso_hash_slot< VT > >::search | ( | zmm::String | key, | |
| struct dso_hash_slot< VT > ** | retSlot | |||
| ) | [inline, inherited] |
Definition at line 113 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::get(), DSOHash< zmm::Array< CacheObject > >::put(), and DSOHash< zmm::Array< CacheObject > >::remove().
| int DHashBase< zmm::String , struct dso_hash_slot< VT > >::secondaryHashCode | ( | int | primary | ) | [inline, inherited] |
Definition at line 103 of file direct_hash_base.h.
| int DHashBase< zmm::String , struct dso_hash_slot< VT > >::size | ( | ) | [inline, inherited] |
Definition at line 60 of file direct_hash_base.h.
| void DHashBase< zmm::String , struct dso_hash_slot< VT > >::zero | ( | ) | [inline, inherited] |
Definition at line 55 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::clear(), and DSOHash< zmm::Array< CacheObject > >::DSOHash().
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().
int DHashBase< zmm::String , struct dso_hash_slot< VT > >::capacity [protected, inherited] |
Definition at line 41 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::releaseData().
int DHashBase< zmm::String , struct dso_hash_slot< VT > >::count [protected, inherited] |
Definition at line 42 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::put(), and DSOHash< zmm::Array< CacheObject > >::remove().
struct dso_hash_slot< VT > * DHashBase< zmm::String , struct dso_hash_slot< VT > >::data [protected, inherited] |
Definition at line 43 of file direct_hash_base.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::releaseData().
zmm::StringBase* DSOHash< VT >::deletedKey [protected] |
Definition at line 61 of file dso_hash.h.
Referenced by DSOHash< zmm::Array< CacheObject > >::DSOHash(), DSOHash< zmm::Array< CacheObject > >::isDeletedSlot(), DSOHash< zmm::Array< CacheObject > >::put(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), and DSOHash< zmm::Array< CacheObject > >::~DSOHash().
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