| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| private final Map | mapThreadToReadLockAcquisitionMetadata
We have seen that the read locks vector we have is very insufficient. |
| private final Vector | readLocks
This vector of read locks is essentially a basket of cache keys (classes that extend concurrency manager) that a specific thread has acquired for reading. |
| private final List | removeReadLockProblemsDetected
This is a field that will never be cleared. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | addReadLock(ConcurrencyManager concurrencyManager)
add a concurrency manager as deferred locks to the DLM |
| public synchronized void | addRemoveReadLockProblemsDetected(String
the detected problem problemDetected)Allow the concurrency manager to directly pump a message stating that there was a problem while decrementing the number of readers. |
| public synchronized ReadLockManager | clone()
Overrides java. ReadLockManager that is in all regards
equal to the current instance.
|
| public Map | |
| public synchronized List | |
| public List | |
| public synchronized boolean | Returns: true if the current read lock manger contains no information about acquired locks that were never released or any errors detected while attempting to remove a cache key. If there is any error detected or any read lock acquired in the tracing we definitely do not want this object instance to be thrown out from our main tracing. It is probably revealing problems in read lock acquisition and released.True if the tracing the data on the object has been completely removed. |
| public synchronized void | removeReadLock(ConcurrencyManager
the concurrency cache key that is about to be decrement in number of readers. concurrencyManager)During normal operation of the concurrency manager, each time a cache key is decrement in the number of readers, so must the corresponding read lock manager of the thread be told let go of the cache key object acquired for reading. |
| FIRST_INDEX_OF_COLLECTION | back to summary |
|---|---|
| public static final int FIRST_INDEX_OF_COLLECTION | |
| mapThreadToReadLockAcquisitionMetadata | back to summary |
|---|---|
| private final Map<Long, List<ReadLockAcquisitionMetadata>> mapThreadToReadLockAcquisitionMetadata We have seen that the read locks vector we have is very insufficient. We keep it for now due to the tracing code that is making use of it. But we also want to have a new tracing map with a lot more metadata | |
| readLocks | back to summary |
|---|---|
| private final Vector<ConcurrencyManager> readLocks This vector of read locks is essentially a basket of cache keys (classes that extend concurrency manager) that a specific thread has acquired for reading. We need to create this additional logic in order to be able to reduce the readers count on a cache key whenever | |
| removeReadLockProblemsDetected | back to summary |
|---|---|
| private final List<String> removeReadLockProblemsDetected This is a field that will never be cleared. It will be getting ADDs if any problem is detected when we try remove a read lock from our tracing. | |
| ReadLockManager | back to summary |
|---|---|
| public ReadLockManager() | |
| addReadLock | back to summary |
|---|---|
| public synchronized void addReadLock(ConcurrencyManager concurrencyManager) add a concurrency manager as deferred locks to the DLM | |
| addRemoveReadLockProblemsDetected | back to summary |
|---|---|
| public synchronized void addRemoveReadLockProblemsDetected(String problemDetected) Allow the concurrency manager to directly pump a message stating that there was a problem while decrementing the number of readers.
| |
| clone | back to summary |
|---|---|
| public synchronized ReadLockManager clone() Overrides java. Create a new instance USE CASE:
| |
| getMapThreadToReadLockAcquisitionMetadata | back to summary |
|---|---|
| public Map Getter for | |
| getReadLocks | back to summary |
|---|---|
| public synchronized List Return a set of the deferred locks | |
| getRemoveReadLockProblemsDetected | back to summary |
|---|---|
| public List Getter for | |
| isEmpty | back to summary |
|---|---|
| public synchronized boolean isEmpty() True if the tracing the data on the object has been completely removed. If this is the case it is perfectly fine to remove the read lock manager from from the hash map of Thread To tis ReadLockManager Tracing.
| |
| removeReadLock | back to summary |
|---|---|
| public synchronized void removeReadLock(ConcurrencyManager concurrencyManager) During normal operation of the concurrency manager, each time a cache key is decrement in the number of readers, so must the corresponding read lock manager of the thread be told let go of the cache key object acquired for reading.
| |