diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-13 00:26:05 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-13 00:26:05 +0000 |
commit | 7a042e4f8a987a50143415af690a878881d4b48f (patch) | |
tree | 338a92488326f0585d65743bd3d6ec0650fd6db1 /apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h | |
parent | 9b50028195a935518c2716dcdb94d5bb167a0af2 (diff) | |
download | ATCD-TAO-1_0_4.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_0_4'.TAO-1_0_4
Diffstat (limited to 'apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h')
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h b/apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h deleted file mode 100644 index 2d310873cb2..00000000000 --- a/apps/JAWS/PROTOTYPE/JAWS/Cache_Hash_T.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -// $Id$ - -#ifndef JAWS_CACHE_HASH_T_H -#define JAWS_CACHE_HASH_T_H - -#include "ace/OS.h" -#include "JAWS/Cache_Object.h" - -// Forward declaration -template <class EXT_ID, class INT_ID, class EQ_FUNC> -class JAWS_Hash_Bucket_Manager; - -template <class EXT_ID, class HASH_FUNC, class EQ_FUNC> -class JAWS_Cache_Hash -{ -public: - - typedef JAWS_Hash_Bucket_Manager<EXT_ID, JAWS_Cache_Object *, EQ_FUNC> - CACHE_BUCKET_MANAGER; - - JAWS_Cache_Hash (ACE_Allocator *alloc = 0, size_t size = 521); - // 521 == smallest number > 512 that is prime. Why is a prime - // number important? I am trying to maximize scattering when using - // mod on the hashed value. This might be bogus though. - - virtual ~JAWS_Cache_Hash (void); - - int find (const EXT_ID &ext_id) const; - int find (const EXT_ID &ext_id, JAWS_Cache_Object *&int_id) const; - int bind (const EXT_ID &ext_id, JAWS_Cache_Object *const &int_id); - int trybind (const EXT_ID &ext_id, JAWS_Cache_Object *&int_id); - int rebind (const EXT_ID &ext_id, JAWS_Cache_Object *const &int_id, - EXT_ID &old_ext_id, JAWS_Cache_Object *&old_int_id); - - int unbind (const EXT_ID &ext_id); - int unbind (const EXT_ID &ext_id, JAWS_Cache_Object *&int_id); - - size_t size (void) const; - -protected: - - virtual unsigned long hash (const EXT_ID &ext_id) const; - int isprime (unsigned long number) const; - int new_cachebucket (size_t idx); - -private: - - ACE_Allocator *allocator_; - size_t size_; - - ACE_SYNCH_MUTEX lock_; - CACHE_BUCKET_MANAGER **hashtable_; - -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "JAWS/Cache_Hash_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#endif /* ACE_CACHE_HASH_T_H */ |