< prev index next >

src/hotspot/share/utilities/concurrentHashTable.hpp

Print this page
rev 50281 : 8195097: Make it possible to process StringTable outside safepoint
Reviewed-by:


 467   template <typename SCAN_FUNC>
 468   void do_scan(Thread* thread, SCAN_FUNC& scan_f);
 469 
 470   // Destroying items matching EVALUATE_FUNC, before destroying items
 471   // DELETE_FUNC is called, if resize lock is obtained. Else returns false.
 472   template <typename EVALUATE_FUNC, typename DELETE_FUNC>
 473   bool try_bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f,
 474                        DELETE_FUNC& del_f);
 475 
 476   // Destroying items matching EVALUATE_FUNC, before destroying items
 477   // DELETE_FUNC is called, when the resize lock is successfully obtained.
 478   template <typename EVALUATE_FUNC, typename DELETE_FUNC>
 479   void bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f, DELETE_FUNC& del_f);
 480 
 481   // Writes statistics to the outputStream. Item sizes are calculated with
 482   // VALUE_SIZE_FUNC.
 483   template <typename VALUE_SIZE_FUNC>
 484   void statistics_to(Thread* thread, VALUE_SIZE_FUNC& vs_f, outputStream* st,
 485                      const char* table_name);
 486 



 487   // This is a Curiously Recurring Template Pattern (CRPT) interface for the
 488   // specialization.
 489   struct BaseConfig {
 490    public:
 491     // Called when the hash table needs the hash for a VALUE.
 492     static uintx get_hash(const VALUE& value, bool* dead) {
 493       return CONFIG::get_hash(value, dead);
 494     }
 495     // On get_copy if no value is found then this value is returned.
 496     static const VALUE& notfound() {
 497       return CONFIG::notfound();
 498     }
 499     // Default node allocation.
 500     static void* allocate_node(size_t size, const VALUE& value);
 501     // Default node reclamation.
 502     static void free_node(void* memory, const VALUE& value);
 503   };
 504 
 505   // Scoped multi getter.
 506   class MultiGetHandle : private ScopedCS {


 467   template <typename SCAN_FUNC>
 468   void do_scan(Thread* thread, SCAN_FUNC& scan_f);
 469 
 470   // Destroying items matching EVALUATE_FUNC, before destroying items
 471   // DELETE_FUNC is called, if resize lock is obtained. Else returns false.
 472   template <typename EVALUATE_FUNC, typename DELETE_FUNC>
 473   bool try_bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f,
 474                        DELETE_FUNC& del_f);
 475 
 476   // Destroying items matching EVALUATE_FUNC, before destroying items
 477   // DELETE_FUNC is called, when the resize lock is successfully obtained.
 478   template <typename EVALUATE_FUNC, typename DELETE_FUNC>
 479   void bulk_delete(Thread* thread, EVALUATE_FUNC& eval_f, DELETE_FUNC& del_f);
 480 
 481   // Writes statistics to the outputStream. Item sizes are calculated with
 482   // VALUE_SIZE_FUNC.
 483   template <typename VALUE_SIZE_FUNC>
 484   void statistics_to(Thread* thread, VALUE_SIZE_FUNC& vs_f, outputStream* st,
 485                      const char* table_name);
 486 
 487   // Moves all nodes from this table to to_cht
 488   bool try_move_nodes_to(Thread* thread, ConcurrentHashTable<VALUE, CONFIG, F>* to_cht);
 489 
 490   // This is a Curiously Recurring Template Pattern (CRPT) interface for the
 491   // specialization.
 492   struct BaseConfig {
 493    public:
 494     // Called when the hash table needs the hash for a VALUE.
 495     static uintx get_hash(const VALUE& value, bool* dead) {
 496       return CONFIG::get_hash(value, dead);
 497     }
 498     // On get_copy if no value is found then this value is returned.
 499     static const VALUE& notfound() {
 500       return CONFIG::notfound();
 501     }
 502     // Default node allocation.
 503     static void* allocate_node(size_t size, const VALUE& value);
 504     // Default node reclamation.
 505     static void free_node(void* memory, const VALUE& value);
 506   };
 507 
 508   // Scoped multi getter.
 509   class MultiGetHandle : private ScopedCS {
< prev index next >