#include <InternalOnline.h>
Definition at line 26 of file InternalOnline.h.
◆ deleter_f
| typedef void EventContainers::I_InternalIDC::deleter_f(const void *p) |
|
inherited |
◆ hashPair
◆ InternalConstItr
◆ InternalOnline()
Definition at line 16 of file InternalOnline.cxx.
17 m_mask(cache->
fullSize(),
false), m_waitNeeded(
false) {}
EventContainers::IdentifiableCacheBase * m_cacheLink
◆ ~InternalOnline()
| virtual EventContainers::InternalOnline::~InternalOnline |
( |
| ) |
|
|
virtualdefault |
◆ addLock()
| StatusCode InternalOnline::addLock |
( |
IdentifierHash | hashId, |
|
|
const void * | ptr ) |
|
overridevirtual |
Implements EventContainers::I_InternalIDC.
Definition at line 145 of file InternalOnline.cxx.
145 {
146 std::pair<bool, const void*> added =
m_cacheLink->addLock(hashId, ptr);
148 throw std::runtime_error("IDC WARNING Deletion shouldn't occur in addLock paradigm");
149 }
150 m_mask[hashId] = true;
151 m_waitNeeded.store(true, std::memory_order_relaxed);
152 return StatusCode::SUCCESS;
153}
◆ cbegin()
◆ cend()
◆ cleanUp()
◆ destructor()
| void InternalOnline::destructor |
( |
deleter_f * | | ) |
|
|
overridevirtualnoexcept |
◆ fetchOrCreate() [1/2]
| StatusCode InternalOnline::fetchOrCreate |
( |
const std::vector< IdentifierHash > & | hashIds | ) |
|
|
overridevirtual |
◆ fetchOrCreate() [2/2]
◆ findIndexPtr()
| const void * InternalOnline::findIndexPtr |
( |
IdentifierHash | hashId | ) |
const |
|
overridevirtualnoexcept |
Implements EventContainers::I_InternalIDC.
Definition at line 137 of file InternalOnline.cxx.
137 {
138 if(hashId < m_mask.size() and m_mask[hashId]) {
140 return cacheLink->findWait(hashId);
141 }
142 return nullptr;
143}
std::vector< IdentifierHash > m_waitlist ATLAS_THREAD_SAFE
◆ fullSize()
| virtual size_t EventContainers::InternalOnline::fullSize |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
◆ getAllCurrentHashes()
| std::vector< IdentifierHash > InternalOnline::getAllCurrentHashes |
( |
| ) |
const |
|
overridevirtual |
◆ getAllHashPtrPair()
◆ indexFind()
Implements EventContainers::I_InternalIDC.
Definition at line 37 of file InternalOnline.cxx.
37 {
38 if(m_waitNeeded.load(std::memory_order_acquire))
wait();
40 if(itr!= m_map.end() && itr->first==hashId) return itr;
41 return m_map.end();
42}
EventContainers::hashPair< void > hashPair
◆ insert()
| bool InternalOnline::insert |
( |
IdentifierHash | hashId, |
|
|
const void * | ptr ) |
|
overridevirtual |
◆ numberOfCollections()
| size_t InternalOnline::numberOfCollections |
( |
| ) |
const |
|
overridevirtual |
◆ removeCollection()
◆ resetMask()
| void InternalOnline::resetMask |
( |
| ) |
|
Definition at line 108 of file InternalOnline.cxx.
108 {
109 if(m_waitNeeded.load(std::memory_order_relaxed))
wait();
111 m_map.clear();
112 m_waitNeeded.store(true, std::memory_order_relaxed);
113}
◆ tryAddFromCache() [1/2]
◆ tryAddFromCache() [2/2]
Implements EventContainers::I_InternalIDC.
Definition at line 68 of file InternalOnline.cxx.
68 {
70
71 if(!m_waitlist.empty()) m_waitNeeded.store(true, std::memory_order_relaxed);
72 if(flag > 0) {
73 if(flag!=3){
74 m_mask[hashId] = true;
75 m_waitNeeded.store(true, std::memory_order_relaxed);
76 }
77 return true;
78 }
79 return false;
80}
◆ wait()
| void InternalOnline::wait |
( |
| ) |
const |
|
overridevirtual |
Implements EventContainers::I_InternalIDC.
Definition at line 44 of file InternalOnline.cxx.
44 {
45
46 std::scoped_lock lock (m_waitMutex);
47 if(m_waitNeeded.load(std::memory_order_acquire) == false) return;
48 using namespace EventContainers;
50 while(!m_waitlist.empty()) {
51 IdentifierHash
hash = m_waitlist.back();
53 const void*
ptr = cacheLink->waitFor(hash);
54 if(ptr == ABORTstate) {
56 }
57 m_waitlist.pop_back();
58 }
59 m_map.clear();
60 for(
size_t i =0;
i<m_mask.size();
i++){
61 if(m_mask[i]) m_map.emplace_back(i,
m_cacheLink->m_vec[i].load(std::memory_order_relaxed));
62 }
63
64
65 m_waitNeeded.store(false, std::memory_order_seq_cst);
66}
static constexpr uintptr_t ABORTEDflag
◆ ATLAS_THREAD_SAFE [1/5]
| std::vector< IdentifierHash > m_waitlist EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/5]
◆ ATLAS_THREAD_SAFE [3/5]
| std::mutex m_waitMutex EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [4/5]
| std::vector<bool> m_mask EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [5/5]
| std::atomic<bool> m_waitNeeded EventContainers::InternalOnline::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ m_cacheLink
The documentation for this class was generated from the following files: