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 |
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::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 100 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 99 of file IdentifiableCacheBase.h.
|
inherited |
Definition at line 34 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 101 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 78 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 84 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 190 of file IdentifiableCacheBase.cxx.
|
inlineinherited |
Definition at line 64 of file IdentifiableCacheBase.h.
|
inherited |
|
inherited |
|
protectedinherited |
Definition at line 131 of file IdentifiableCacheBase.cxx.
|
inherited |
In a concurrent situation this number isn't necessarily perfectly synchronised with ids().size()
Definition at line 185 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 39 of file IdentifiableCacheBase.cxx.
|
inherited |
Halts the thread until the require hash is completed or aborted.
Definition at line 111 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 104 of file IdentifiableCacheBase.h.
Definition at line 97 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 102 of file IdentifiableCacheBase.h.
|
privateinherited |
Definition at line 95 of file IdentifiableCacheBase.h.