ATLAS Offline Software
|
#include <IdentifiableCache.h>
Classes | |
class | Maker |
Public Types | |
typedef std::true_type | thread_safe |
Public Member Functions | |
IdentifiableCache (IdentifierHash maxHash, const Maker *maker) | |
IdentifiableCache (IdentifierHash maxHash, const Maker *maker, size_t lockBucketSize) | |
~IdentifiableCache () | |
const T * | find (IdentifierHash hash) |
const T * | findWait (IdentifierHash hash) |
const T * | get (IdentifierHash hash) |
std::pair< bool, const void * > | add (IdentifierHash hash, const T *p) |
std::pair< bool, const void * > | add (IdentifierHash hash, std::unique_ptr< T > p) |
void | clearCache () |
std::vector< IdentifierHash > | ids () |
In a threaded situation this collection will be valid but will not container hashes later added. More... | |
std::pair< bool, const void * > | add (IdentifierHash hash, const void *p) noexcept |
std::pair< bool, const void * > | add (IdentifierHash hash, void_unique_ptr p) noexcept |
std::pair< bool, const void * > | addLock (IdentifierHash hash, const void *p) noexcept |
std::pair< bool, const void * > | addLock (IdentifierHash hash, void_unique_ptr p) noexcept |
bool | IMakerPresent () const |
int | tryLock (IdentifierHash, IDC_WriteHandleBase &, std::vector< IdentifierHash > &) |
Checks if the item is completed if it is not started it extablishes lock (returns 0), If it is started but not completed it adds to wait list (returns 1) If the item is already completed it returns 2 If the item is aborted it does nothing and returns 3. More... | |
int | itemAborted (IdentifierHash) |
Returns 1 is the item has been aborted otherwise 0. More... | |
int | itemInProgress (IdentifierHash) |
Returns 1 is the item is inprogress otherwise 0. More... | |
const void * | waitFor (IdentifierHash) |
Halts the thread until the require hash is completed or aborted. More... | |
void | createSet (const std::vector< IdentifierHash > &hashes, std::vector< bool > &mask) |
Create a set of hashes, updates an IDC mask as appropriate. More... | |
size_t | fullSize () const |
size_t | numberOfHashes () |
In a concurrent situation this number isn't necessarily perfectly synchronised with ids().size() More... | |
Static Public Attributes | |
static constexpr uintptr_t | INVALIDflag = UINTPTR_MAX |
static constexpr uintptr_t | ABORTEDflag = UINTPTR_MAX-1 |
static constexpr size_t | s_defaultBucketSize =2 |
Protected Member Functions | |
void | clear (deleter_f *deleter) |
void | cleanUp (deleter_f *deleter) |
void | notifyHash (IdentifierHash hash) |
Private Types | |
typedef std::mutex | mutex_t |
typedef std::scoped_lock< mutex_t > | lock_t |
typedef std::unique_lock< mutex_t > | uniqueLock |
Private Attributes | |
std::vector< std::atomic< const void * > > | m_vec |
const IMaker * | m_maker |
mutex_t | m_mutex |
std::unique_ptr< mutexPair[]> | m_HoldingMutexes |
Pool of mutexes used for waiting on completion if in a concurrent environment. More... | |
size_t | m_NMutexes |
std::atomic< size_t > | m_currentHashes |
Holds the number of valid hashes in container, in concurrent use it is not guaranteed to be up to date. More... | |
Definition at line 27 of file IdentifiableCache.h.
|
privateinherited |
Definition at line 108 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 107 of file IdentifiableCacheBase.h.
|
inherited |
Definition at line 39 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 109 of file IdentifiableCacheBase.h.
|
inline |
Definition at line 43 of file IdentifiableCache.h.
|
inline |
Definition at line 48 of file IdentifiableCache.h.
|
inline |
Definition at line 53 of file IdentifiableCache.h.
|
inline |
Definition at line 74 of file IdentifiableCache.h.
|
noexceptinherited |
|
inline |
Definition at line 79 of file IdentifiableCache.h.
|
noexceptinherited |
|
noexceptinherited |
|
noexceptinherited |
|
protectedinherited |
Definition at line 102 of file IdentifiableCacheBase.cxx.
|
protectedinherited |
|
inline |
Definition at line 84 of file IdentifiableCache.h.
|
inherited |
|
inline |
Definition at line 59 of file IdentifiableCache.h.
|
inline |
Definition at line 64 of file IdentifiableCache.h.
|
inlineinherited |
Definition at line 89 of file IdentifiableCacheBase.h.
|
inline |
Definition at line 69 of file IdentifiableCache.h.
|
inherited |
In a threaded situation this collection will be valid but will not container hashes later added.
Definition at line 233 of file IdentifiableCacheBase.cxx.
|
inlineinherited |
Definition at line 69 of file IdentifiableCacheBase.h.
|
inherited |
|
inherited |
|
protectedinherited |
Definition at line 166 of file IdentifiableCacheBase.cxx.
|
inherited |
In a concurrent situation this number isn't necessarily perfectly synchronised with ids().size()
Definition at line 228 of file IdentifiableCacheBase.cxx.
|
inherited |
Checks if the item is completed if it is not started it extablishes lock (returns 0), If it is started but not completed it adds to wait list (returns 1) If the item is already completed it returns 2 If the item is aborted it does nothing and returns 3.
Definition at line 57 of file IdentifiableCacheBase.cxx.
|
inherited |
Halts the thread until the require hash is completed or aborted.
Definition at line 135 of file IdentifiableCacheBase.cxx.
|
staticconstexprinherited |
Definition at line 31 of file IdentifiableCacheBase.h.
|
staticconstexprinherited |
Definition at line 30 of file IdentifiableCacheBase.h.
|
privateinherited |
Holds the number of valid hashes in container, in concurrent use it is not guaranteed to be up to date.
Definition at line 117 of file IdentifiableCacheBase.h.
|
privateinherited |
Pool of mutexes used for waiting on completion if in a concurrent environment.
Definition at line 113 of file IdentifiableCacheBase.h.
Definition at line 105 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 110 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 114 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 103 of file IdentifiableCacheBase.h.
|
staticconstexprinherited |
Definition at line 36 of file IdentifiableCacheBase.h.