diff -r c396e381cfa4 -r ae2e53e379cb src/hotspot/share/utilities/concurrentHashTable.hpp --- a/src/hotspot/share/utilities/concurrentHashTable.hpp Mon Jun 24 14:13:49 2019 -0400 +++ b/src/hotspot/share/utilities/concurrentHashTable.hpp Mon Jun 24 16:51:23 2019 -0400 @@ -38,8 +38,9 @@ class Thread; class Mutex; -template +template class ConcurrentHashTable : public CHeapObj { + typedef typename CONFIG::Value VALUE; private: // This is the internal node structure. // Only constructed with placement new from memory allocated with MEMFLAGS of @@ -252,10 +253,10 @@ class ScopedCS: public StackObj { protected: Thread* _thread; - ConcurrentHashTable* _cht; + ConcurrentHashTable* _cht; GlobalCounter::CSContext _cs_context; public: - ScopedCS(Thread* thread, ConcurrentHashTable* cht); + ScopedCS(Thread* thread, ConcurrentHashTable* cht); ~ScopedCS(); }; @@ -473,26 +474,12 @@ const char* table_name); // Moves all nodes from this table to to_cht - bool try_move_nodes_to(Thread* thread, ConcurrentHashTable* to_cht); - - // This is a Curiously Recurring Template Pattern (CRPT) interface for the - // specialization. - struct BaseConfig { - public: - // Called when the hash table needs the hash for a VALUE. - static uintx get_hash(const VALUE& value, bool* dead) { - return CONFIG::get_hash(value, dead); - } - // Default node allocation. - static void* allocate_node(size_t size, const VALUE& value); - // Default node reclamation. - static void free_node(void* memory, const VALUE& value); - }; + bool try_move_nodes_to(Thread* thread, ConcurrentHashTable* to_cht); // Scoped multi getter. class MultiGetHandle : private ScopedCS { public: - MultiGetHandle(Thread* thread, ConcurrentHashTable* cht) + MultiGetHandle(Thread* thread, ConcurrentHashTable* cht) : ScopedCS(thread, cht) {} // In the MultiGetHandle scope you can lookup items matching LOOKUP_FUNC. // The VALUEs are safe as long as you never save the VALUEs outside the