< prev index next >

src/hotspot/share/utilities/concurrentHashTable.hpp

Print this page

        

*** 307,317 **** bool* grow_hint = NULL); // Insert which handles a number of cases. template <typename LOOKUP_FUNC, typename VALUE_FUNC, typename CALLBACK_FUNC> bool internal_insert(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& value_f, ! CALLBACK_FUNC& callback, bool* grow_hint = NULL); // Returns true if an item matching LOOKUP_FUNC is removed. // Calls DELETE_FUNC before destroying the node. template <typename LOOKUP_FUNC, typename DELETE_FUNC> bool internal_remove(Thread* thread, LOOKUP_FUNC& lookup_f, --- 307,317 ---- bool* grow_hint = NULL); // Insert which handles a number of cases. template <typename LOOKUP_FUNC, typename VALUE_FUNC, typename CALLBACK_FUNC> bool internal_insert(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& value_f, ! CALLBACK_FUNC& callback, bool* grow_hint = NULL, bool* clean_hint = NULL); // Returns true if an item matching LOOKUP_FUNC is removed. // Calls DELETE_FUNC before destroying the node. template <typename LOOKUP_FUNC, typename DELETE_FUNC> bool internal_remove(Thread* thread, LOOKUP_FUNC& lookup_f,
*** 394,405 **** // LOOKUP_FUNC is matching methods, VALUE_FUNC creates value to be inserted // and CALLBACK_FUNC is called with new or old value. Returns true if the // value already exists. template <typename LOOKUP_FUNC, typename VALUE_FUNC, typename CALLBACK_FUNC> bool get_insert_lazy(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& val_f, ! CALLBACK_FUNC& callback_f, bool* grow_hint = NULL) { ! return !internal_insert(thread, lookup_f, val_f, callback_f, grow_hint); } // Same without CALLBACK_FUNC. template <typename LOOKUP_FUNC, typename VALUE_FUNC> bool get_insert_lazy(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& val_f, --- 394,405 ---- // LOOKUP_FUNC is matching methods, VALUE_FUNC creates value to be inserted // and CALLBACK_FUNC is called with new or old value. Returns true if the // value already exists. template <typename LOOKUP_FUNC, typename VALUE_FUNC, typename CALLBACK_FUNC> bool get_insert_lazy(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& val_f, ! CALLBACK_FUNC& callback_f, bool* grow_hint = NULL, bool* clean_hint = NULL) { ! return !internal_insert(thread, lookup_f, val_f, callback_f, grow_hint, clean_hint); } // Same without CALLBACK_FUNC. template <typename LOOKUP_FUNC, typename VALUE_FUNC> bool get_insert_lazy(Thread* thread, LOOKUP_FUNC& lookup_f, VALUE_FUNC& val_f,
*** 434,446 **** // Returns true true if the item was inserted, duplicates are found with // LOOKUP_FUNC. template <typename LOOKUP_FUNC> bool insert(Thread* thread, LOOKUP_FUNC& lookup_f, const VALUE& value, ! bool* grow_hint = NULL) { LazyValueRetrieve vp(value); ! return internal_insert(thread, lookup_f, vp, noOp, grow_hint); } // This does a fast unsafe insert and can thus only be used when there is no // risk for a duplicates and no other threads uses this table. bool unsafe_insert(const VALUE& value); --- 434,446 ---- // Returns true true if the item was inserted, duplicates are found with // LOOKUP_FUNC. template <typename LOOKUP_FUNC> bool insert(Thread* thread, LOOKUP_FUNC& lookup_f, const VALUE& value, ! bool* grow_hint = NULL, bool* clean_hint = NULL) { LazyValueRetrieve vp(value); ! return internal_insert(thread, lookup_f, vp, noOp, grow_hint, clean_hint); } // This does a fast unsafe insert and can thus only be used when there is no // risk for a duplicates and no other threads uses this table. bool unsafe_insert(const VALUE& value);
< prev index next >