mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8214822: Move ConcurrentHashTable VALUE parameter to CONFIG
Make VALUE parameter be included in CONFIG configuration, also remove BaseConfig Reviewed-by: dholmes, kbarrett
This commit is contained in:
parent
13d3c63405
commit
cd598622cc
7 changed files with 205 additions and 231 deletions
|
@ -32,10 +32,10 @@
|
|||
// operations, which they are serialized with each other.
|
||||
|
||||
// Base class for pause and/or parallel bulk operations.
|
||||
template <typename VALUE, typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<VALUE, CONFIG, F>::BucketsOperation {
|
||||
template <typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<CONFIG, F>::BucketsOperation {
|
||||
protected:
|
||||
ConcurrentHashTable<VALUE, CONFIG, F>* _cht;
|
||||
ConcurrentHashTable<CONFIG, F>* _cht;
|
||||
|
||||
// Default size of _task_size_log2
|
||||
static const size_t DEFAULT_TASK_SIZE_LOG2 = 12;
|
||||
|
@ -47,7 +47,7 @@ class ConcurrentHashTable<VALUE, CONFIG, F>::BucketsOperation {
|
|||
size_t _size_log2; // Table size.
|
||||
bool _is_mt;
|
||||
|
||||
BucketsOperation(ConcurrentHashTable<VALUE, CONFIG, F>* cht, bool is_mt = false)
|
||||
BucketsOperation(ConcurrentHashTable<CONFIG, F>* cht, bool is_mt = false)
|
||||
: _cht(cht), _next_to_claim(0), _task_size_log2(DEFAULT_TASK_SIZE_LOG2),
|
||||
_stop_task(0), _size_log2(0), _is_mt(is_mt) {}
|
||||
|
||||
|
@ -116,12 +116,12 @@ public:
|
|||
};
|
||||
|
||||
// For doing pausable/parallel bulk delete.
|
||||
template <typename VALUE, typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<VALUE, CONFIG, F>::BulkDeleteTask :
|
||||
template <typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<CONFIG, F>::BulkDeleteTask :
|
||||
public BucketsOperation
|
||||
{
|
||||
public:
|
||||
BulkDeleteTask(ConcurrentHashTable<VALUE, CONFIG, F>* cht, bool is_mt = false)
|
||||
BulkDeleteTask(ConcurrentHashTable<CONFIG, F>* cht, bool is_mt = false)
|
||||
: BucketsOperation(cht, is_mt) {
|
||||
}
|
||||
// Before start prepare must be called.
|
||||
|
@ -160,12 +160,12 @@ class ConcurrentHashTable<VALUE, CONFIG, F>::BulkDeleteTask :
|
|||
}
|
||||
};
|
||||
|
||||
template <typename VALUE, typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<VALUE, CONFIG, F>::GrowTask :
|
||||
template <typename CONFIG, MEMFLAGS F>
|
||||
class ConcurrentHashTable<CONFIG, F>::GrowTask :
|
||||
public BucketsOperation
|
||||
{
|
||||
public:
|
||||
GrowTask(ConcurrentHashTable<VALUE, CONFIG, F>* cht) : BucketsOperation(cht) {
|
||||
GrowTask(ConcurrentHashTable<CONFIG, F>* cht) : BucketsOperation(cht) {
|
||||
}
|
||||
// Before start prepare must be called.
|
||||
bool prepare(Thread* thread) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue