Uses of Class
org.eclipse.persistence.internal.helper.ConcurrencyManager
-
-
Uses of ConcurrencyManager in org.eclipse.persistence.internal.helper
Fields in org.eclipse.persistence.internal.helper with type parameters of type ConcurrencyManager Modifier and Type Field Description protected Vector<ConcurrencyManager>DeferredLockManager. activeLocksprotected Vector<ConcurrencyManager>DeferredLockManager. deferredLocksMethods in org.eclipse.persistence.internal.helper that return types with arguments of type ConcurrencyManager Modifier and Type Method Description static Map<Thread,ConcurrencyManager>ConcurrencyUtil. cloneMapThreadToWaitOnAcquire(Map<Thread,ConcurrencyManager> mapThreadToWaitOnAcquireOriginal)Clone the static map of the concurrency manager that tells us about threads waiting to acquire locks.static Map<Thread,Set<ConcurrencyManager>>ConcurrencyUtil. cloneMapThreadToWaitOnAcquireInsideWriteLockManagerOriginal(Map<Thread,Set<ConcurrencyManager>> mapThreadToWaitOnAcquireInsideWriteLockManagerOriginal)Clone the static map of the concurrency manager that tells us about threads waiting to acquire locks.Vector<ConcurrencyManager>DeferredLockManager. getActiveLocks()Return a set of the active locks from the DLMVector<ConcurrencyManager>DeferredLockManager. getDeferredLocks()Return a set of the deferred locksList<ConcurrencyManager>ReadLockManager. getReadLocks()Return a set of the deferred locksstatic Map<Thread,ConcurrencyManager>ConcurrencyManager. getThreadsToWaitOnAcquire()Getter forTHREADS_TO_WAIT_ON_ACQUIREstatic Map<Thread,ConcurrencyManager>ConcurrencyManager. getThreadsToWaitOnAcquireReadLock()Getter forTHREADS_TO_WAIT_ON_ACQUIRE_READ_LOCKstatic Map<Thread,Set<ConcurrencyManager>>WriteLockManager. getThreadToFailToAcquireCacheKeys()Methods in org.eclipse.persistence.internal.helper with parameters of type ConcurrencyManager Modifier and Type Method Description static voidWriteLockManager. addCacheKeyToMapWriteLockManagerToCacheKeysThatCouldNotBeAcquired(Thread thread, ConcurrencyManager cacheKeyThatCouldNotBeAcquired, long whileStartDate)The thread was doing its while loop to acquire all required locks to proceed with the commmit and it realized there was one cache key it is unable to acquirevoidReadLockManager. addReadLock(ConcurrencyManager concurrencyManager)add a concurrency manager as deferred locks to the DLMprotected StringConcurrencyUtil. createInformationAboutAllResourcesAcquiredAndDeferredByThread(ReadLockManager readLockManager, DeferredLockManager lockManager, Set<ConcurrencyManager> waitingOnAcquireCacheKeys, ConcurrencyManager waitingOnAcquireReadCacheKey, boolean threadWaitingToReleaseDeferredLocks, Thread thread, int currentThreadNumber, int totalNumberOfThreads, Set<Object> writeManagerThreadPrimaryKeysWithChangesToBeMerged, String waitingToReleaseDeferredLocksJustification)Build a string that tries to describe in as much detail as possible the resources associated to the current thread.ReadLockAcquisitionMetadataConcurrencyUtil. createReadLockAcquisitionMetadata(ConcurrencyManager concurrencyManager)The concurrency managers about to acquire a cache key.StringConcurrencyUtil. createToStringExplainingOwnedCacheKey(ConcurrencyManager concurrencyManager)protected StringConcurrencyUtil. currentThreadIsStuckForSomeTimeProduceTinyLogMessage(long elapsedTime, ConcurrencyManager concurrencyManager, DeferredLockManager lockManager, ReadLockManager readLockManager)We have a thread that is not evolving for quite some while.protected DeadLockComponentExplainDeadLockUtil. deadLockFoundCreateConcurrencyManagerStateDeferredThreadCouldNotAcquireWriteLock(DeadLockComponent nextThreadPartOfDeadLock, Thread threadNotAbleToAccessResource, ConcurrencyManager cacheKeyBlockingIsBuildObjectComplete)Create a deadlock component for a thread known to be stuck trying to release deferred locks.protected DeadLockComponentExplainDeadLockUtil. deadLockFoundCreateConcurrencyManagerStateReaderThreadCouldNotAcquireWriteLock(DeadLockComponent nextThreadPartOfDeadLock, Thread threadNotAbleToAccessResource, ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet)Dto component participating in a dead lock.protected DeadLockComponentExplainDeadLockUtil. deadLockFoundCreateConcurrencyManagerStateWriterThreadCouldNotAcquireWriteLock(DeadLockComponent nextThreadPartOfDeadLock, Thread threadNotAbleToAccessResource, ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet)Create a dead lock dto component.voidConcurrencyUtil. determineIfReleaseDeferredLockAppearsToBeDeadLocked(ConcurrencyManager concurrencyManager, long whileStartTimeMillis, DeferredLockManager lockManager, ReadLockManager readLockManager, boolean callerIsWillingToAllowInterruptedExceptionToBeFiredUpIfNecessary)Throw an interrupted exception if appears that eclipse link code is taking too long to release a deferred lock.static voidConcurrencyManager. enrichStringBuildingExplainWhyThreadIsStuckInIsBuildObjectOnThreadComplete(List<Thread> chainOfThreadsExpandedInRecursion, ConcurrencyManager finalDeferredLockCausingTrouble, Thread activeThreadOnDeferredLock, boolean hasDeferredLockManager, StringBuilder justification)When the recursive algorithm decides to return false it is because it is confronted with a cache key that had to be deferred.protected CacheKeyToThreadRelationshipsConcurrencyUtil. get(ConcurrencyManager cacheKey, Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey)Helper method to make sure we never get null dto from the mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey.StringConcurrencyUtil. readLockManagerProblem01CreateLogErrorMessageToIndicateThatCurrentThreadHasNullReadLockManagerWhileDecrementingNumberOfReaders(int currentNumberOfReaders, int decrementedNumberOfReaders, ConcurrencyManager cacheKey)If when we are decrement the counter of number of readers on a cache key we find ourselves lacking the read lock manager at the time of the decrement we want to log a big fat error on the server log protecting that the current thread is misbehaving.StringConcurrencyUtil. readLockManagerProblem02ReadLockManageHasNoEntriesForThread(ConcurrencyManager cacheKey, long threadId)StringConcurrencyUtil. readLockManagerProblem03ReadLockManageHasNoEntriesForThread(ConcurrencyManager cacheKey, long threadId)protected DeadLockComponentExplainDeadLockUtil. recursiveExpansionCurrentThreadBeingBlockedByActiveThreadOnCacheKey(ConcurrencyManagerState concurrencyManagerState, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet, boolean currentThreadWantsToAcquireForWriting)Try to expand the current thread from the perspective that it wants a cache key that may be own for writing by a competitor thread.protected DeadLockComponentExplainDeadLockUtil. recursiveExpansionCurrentThreadBeingBlockedByActiveWriters(ConcurrencyManagerState concurrencyManagerState, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet, boolean currentThreadWantsToAcquireForWriting)Try to expand the current thread from the perspective that it wants a cache key that may be own for writing by a competitor thread.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep03ExpandBasedOnCacheKeyWantedForWriting(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)We are looking at thread that we know has registered itself as wanting to acquire a write lock and not managing to make progress getting the write lock.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep03Scenario01CurrentWriterVsOtherWritersWriter(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)Expand the possibility of the current thread wanting to acquire for writing what some other already has acquired for writing.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep03Scenario02CurrentWriterVsOtherReader(ConcurrencyManagerState concurrencyManagerState, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)Expand the recursion exploring the possibility that the reason the current thread cannot acquire the cache key is because there are readers on the cache key.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep03Scenario03CurrentWriterVsCacheKeyActiveThread(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)In scenario 3 is when we start considering the possbility our data for detecting the dead lock is not ok or the cache is corrupted.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep05ExpandBasedOnCacheKeyWantedForReading(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForReadingButCannotGet)In this case have a thread that wants to acquire for reading a cache key but it does not manage to acquire it because the cache key is being owned by somebody else.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep05Scenario01CurrentReaderVsOtherWriters(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)Expand the possibility of the current thread wanting to acquire for writing what some other already has acquired for writing.protected DeadLockComponentExplainDeadLockUtil. recursiveExplainPossibleDeadLockStep05Scenario02CurrentReaderVsCacheKeyActiveThread(ConcurrencyManagerState concurrencyManagerStateDto, int recursionMaxDepth, int currentRecursionDepth, Thread currentCandidateThreadPartOfTheDeadLock, List<Thread> threadPartOfCurrentDeadLockExpansion, Set<Thread> threadsAlreadyExpandedInThePastThatWeDoNotWantToExpandAgain, ConcurrencyManager cacheKeyCurrentThreadWantsForWritingButCannotGet)Same asExplainDeadLockUtil.recursiveExplainPossibleDeadLockStep03Scenario03CurrentWriterVsCacheKeyActiveThread(ConcurrencyManagerState, int, int, Thread, List, Set, ConcurrencyManager)but in this case our candidate thread is trying to get the cache key with the purpose of READING and not for writing.static voidWriteLockManager. removeCacheKeyFromMapWriteLockManagerToCacheKeysThatCouldNotBeAcquired(Thread thread, ConcurrencyManager cacheKeyThatCouldNotBeAcquired)A cache keys was successfully acquired we want to make sure it is not recorded in the map of cache keys that could not be acquired.voidReadLockManager. 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.Method parameters in org.eclipse.persistence.internal.helper with type arguments of type ConcurrencyManager Modifier and Type Method Description static Map<Thread,ConcurrencyManager>ConcurrencyUtil. cloneMapThreadToWaitOnAcquire(Map<Thread,ConcurrencyManager> mapThreadToWaitOnAcquireOriginal)Clone the static map of the concurrency manager that tells us about threads waiting to acquire locks.static Map<Thread,Set<ConcurrencyManager>>ConcurrencyUtil. cloneMapThreadToWaitOnAcquireInsideWriteLockManagerOriginal(Map<Thread,Set<ConcurrencyManager>> mapThreadToWaitOnAcquireInsideWriteLockManagerOriginal)Clone the static map of the concurrency manager that tells us about threads waiting to acquire locks.protected StringConcurrencyUtil. createInformationAboutAllResourcesAcquiredAndDeferredByThread(ReadLockManager readLockManager, DeferredLockManager lockManager, Set<ConcurrencyManager> waitingOnAcquireCacheKeys, ConcurrencyManager waitingOnAcquireReadCacheKey, boolean threadWaitingToReleaseDeferredLocks, Thread thread, int currentThreadNumber, int totalNumberOfThreads, Set<Object> writeManagerThreadPrimaryKeysWithChangesToBeMerged, String waitingToReleaseDeferredLocksJustification)Build a string that tries to describe in as much detail as possible the resources associated to the current thread.protected StringConcurrencyUtil. createInformationAboutAllThreadsWaitingToAcquireReadCacheKeys(Map<Thread,ConcurrencyManager> mapThreadToWaitOnAcquireReadLockClone, Map<Thread,String> mapThreadToWaitOnAcquireReadLockMethodNameClone)In this page of log dumping information we want to give a summary to the user of threads that appear to be stuck doing an acquire of the cache key.voidConcurrencyUtil. enrichMapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKeyInfoAboutActiveAndDeferredLocks(Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey, Map<Thread,DeferredLockManager> deferredLockManagerMapClone)Enrich our map map of cache key to threads having a relationship with that object in regards to active locks on the cache key and deferred locks on the cache keyvoidConcurrencyUtil. enrichMapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKeyInfoAboutReadLocks(Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey, Map<Thread,ReadLockManager> readLockManagerMapClone)Enrich the mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey based on the read locksvoidConcurrencyUtil. enrichMapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKeyInfoThreadsStuckOnAcquire(Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey, Map<Thread,Set<ConcurrencyManager>> unifiedMapOfThreadsStuckTryingToAcquireWriteLock)Enrich the mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey by setting on the cache keys the threads that are stuck trying to acquire the cache key.voidConcurrencyUtil. enrichMapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKeyInfoThreadsStuckOnAcquireLockForReading(Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey, Map<Thread,ConcurrencyManager> mapThreadToWaitOnAcquireReadLockClone)Enrich the mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey by setting on the cache keys the threads that are stuck trying to acquire the cache key with a read lock.static voidConcurrencyUtil. enrichMapThreadToWaitOnAcquireInsideWriteLockManagerClone(Map<Thread,Set<ConcurrencyManager>> mapThreadToWaitOnAcquireInsideWriteLockManagerClone, Map<Thread,ConcurrencyManager> mapThreadToWaitOnAcquireClone)We have two maps we are using to trace threads that are stuck acquiring locks.protected CacheKeyToThreadRelationshipsConcurrencyUtil. get(ConcurrencyManager cacheKey, Map<ConcurrencyManager,CacheKeyToThreadRelationships> mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey)Helper method to make sure we never get null dto from the mapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey.voidDeferredLockManager. setActiveLocks(Vector<ConcurrencyManager> activeLocks)set a set of the active locks to the DLMvoidDeferredLockManager. setDeferredLocks(Vector<ConcurrencyManager> deferredLocks)set a set of the deferred locks to the DLM -
Uses of ConcurrencyManager in org.eclipse.persistence.internal.helper.type
Methods in org.eclipse.persistence.internal.helper.type that return ConcurrencyManager Modifier and Type Method Description ConcurrencyManagerCacheKeyToThreadRelationships. getCacheKeyBeingDescribed()ConcurrencyManagerIsBuildObjectCompleteOutcome. getCacheKeyOwnedByBlockingThread()ConcurrencyManagerDeadLockComponent. getCacheKeyThreadWantsToAcquireButCannotGet()ConcurrencyManagerReadLockAcquisitionMetadata. getCacheKeyWhoseNumberOfReadersThreadIsIncrementing()Methods in org.eclipse.persistence.internal.helper.type that return types with arguments of type ConcurrencyManager Modifier and Type Method Description Map<ConcurrencyManager,CacheKeyToThreadRelationships>ConcurrencyManagerState. getMapOfCacheKeyToDtosExplainingThreadExpectationsOnCacheKey()Map<Thread,ConcurrencyManager>ConcurrencyManagerState. getMapThreadToWaitOnAcquireReadLockClone()Map<Thread,Set<ConcurrencyManager>>ConcurrencyManagerState. getUnifiedMapOfThreadsStuckTryingToAcquireWriteLock()Methods in org.eclipse.persistence.internal.helper.type with parameters of type ConcurrencyManager Modifier and Type Method Description voidDeadLockComponent. setCacheKeyThreadWantsToAcquireButCannotGet(ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet)Constructors in org.eclipse.persistence.internal.helper.type with parameters of type ConcurrencyManager Constructor Description CacheKeyToThreadRelationships(ConcurrencyManager cacheKeyBeingDescribed)Create a new CacheKeyToThreadRelationships.DeadLockComponent(Thread threadNotAbleToAccessResource, boolean stuckOnReleaseDeferredLock, boolean stuckThreadAcquiringLockForWriting, boolean stuckThreadAcquiringLockForReading, ConcurrencyManager cacheKeyThreadWantsToAcquireButCannotGet, boolean deadLockPotentiallyCausedByCacheKeyWithCorruptedActiveThread, boolean deadLockPotentiallyCausedByCacheKeyWithCorruptedNumberOfReaders, DeadLockComponent nextThreadPartOfDeadLock)Create a new DeadLockComponent.IsBuildObjectCompleteOutcome(Thread threadBlockingTheDeferringThreadFromFinishing, ConcurrencyManager cacheKeyOwnedByBlockingThread)Create a new IsBuildObjectCompleteOutcome.ReadLockAcquisitionMetadata(ConcurrencyManager cacheKeyWhoseNumberOfReadersThreadIsIncrementing, int numberOfReadersOnCacheKeyBeforeIncrementingByOne, String currentThreadStackTraceInformation, long currentThreadStackTraceInformationCpuTimeCostMs)Create a new ReadLockAcquisitionMetadata. -
Uses of ConcurrencyManager in org.eclipse.persistence.internal.identitymaps
Subclasses of ConcurrencyManager in org.eclipse.persistence.internal.identitymaps Modifier and Type Class Description classCacheKeyPurpose: Container class for storing objects in an IdentityMap.classHardCacheWeakIdentityMap.ReferenceCacheKeyInner class to define the specialized weak cache key.classLinkedCacheKeyPurpose: Provides the capability to insert CacheKeys into a Linked List.classQueueableWeakCacheKeyclassSoftCacheKeyPurpose: Container class for storing objects in an IdentityMap.classWeakCacheKeyPurpose: Container class for storing objects in an IdentityMap.Fields in org.eclipse.persistence.internal.identitymaps declared as ConcurrencyManager Modifier and Type Field Description protected ConcurrencyManagerIdentityMapManager. cacheMutexEnsure mutual exclusion depending on the cache isolation.Methods in org.eclipse.persistence.internal.identitymaps that return ConcurrencyManager Modifier and Type Method Description ConcurrencyManagerIdentityMapManager. getCacheMutex()Return the cache mutex.Methods in org.eclipse.persistence.internal.identitymaps with parameters of type ConcurrencyManager Modifier and Type Method Description protected voidIdentityMapManager. setCacheMutex(ConcurrencyManager cacheMutex)Set the cache mutex. -
Uses of ConcurrencyManager in org.eclipse.persistence.internal.sessions
Fields in org.eclipse.persistence.internal.sessions declared as ConcurrencyManager Modifier and Type Field Description protected ConcurrencyManagerAbstractSession. transactionMutexEnsure mutual exclusion of the session's transaction state across multiple threads.Methods in org.eclipse.persistence.internal.sessions that return ConcurrencyManager Modifier and Type Method Description ConcurrencyManagerAbstractSession. getTransactionMutex()INTERNAL: The transaction mutex ensure mutual exclusion on transaction across multiple threads.Methods in org.eclipse.persistence.internal.sessions with parameters of type ConcurrencyManager Modifier and Type Method Description protected voidAbstractSession. setTransactionMutex(ConcurrencyManager transactionMutex) -
Uses of ConcurrencyManager in org.eclipse.persistence.sessions.interceptors
Subclasses of ConcurrencyManager in org.eclipse.persistence.sessions.interceptors Modifier and Type Class Description classCacheKeyInterceptorThe CacheKeyInterceptor allows a Cache Interceptor implementation to wrap the EclipseLink CacheKey.
-