/** * Acquire the lock on the cache key object. For the merge process * called with true from the merge process, if true then the refresh will not refresh the object */ public void acquire(boolean forMerge) { if (this.isIsolated) { this.depth++; return; } super.acquire(forMerge); }
/** * Wait for all threads except the active thread. * If the active thread just increment the depth. * This should be called before entering a critical section. */ public void acquire() throws ConcurrencyException { this.acquire(false); }
/** * Wait for all threads except the active thread. * If the active thread just increment the depth. * This should be called before entering a critical section. */ public void acquire() throws ConcurrencyException { this.acquire(false); }
/** * Acquire the lock on the cache key object. For the merge process * called with true from the merge process, if true then the refresh will not refresh the object */ public void acquire(boolean forMerge) { if (this.isIsolated) { this.depth++; return; } super.acquire(forMerge); }
/** * Acquire the lock on the cache key object. */ public void acquire() { if (this.isIsolated) { this.depth++; return; } super.acquire(false); }
/** * Acquire the lock on the cache key object. */ public void acquire() { if (this.isIsolated) { this.depth++; return; } super.acquire(false); }
/** * Wait for all threads except the active thread. * If the active thread just increment the depth. * This should be called before entering a critical section. */ public void acquire() throws ConcurrencyException { this.acquire(false); }
/** * If the activeThread is not set, acquire it and return true. * If the activeThread is set, it has been acquired already, return false. * Added for Bug 5840635 * Call with true from the merge process, if true then the refresh will not refresh the object. */ public synchronized boolean acquireIfUnownedNoWait(boolean forMerge) throws ConcurrencyException { // Only acquire lock if active thread is null. Do not check current thread. if (this.activeThread == null) { // if lock is unowned increment depth acquire(forMerge); return true; } else { return false; } }
/** * If the activeThread is not set, acquire it and return true. * If the activeThread is set, it has been acquired already, return false. * Added for Bug 5840635 * Call with true from the merge process, if true then the refresh will not refresh the object. */ public synchronized boolean acquireIfUnownedNoWait(boolean forMerge) throws ConcurrencyException { // Only acquire lock if active thread is null. Do not check current thread. if (this.activeThread == null && this.numberOfReaders == 0) { // if lock is unowned increment depth acquire(forMerge); return true; } else { return false; } }
/** * If the lock is not acquired already acquire it and return true. * If it has been acquired already return false * Added for CR 2317 * called with true from the merge process, if true then the refresh will not refresh the object */ public synchronized boolean acquireNoWait(boolean forMerge) throws ConcurrencyException { if ((this.activeThread == null && this.numberOfReaders == 0) || (this.activeThread == Thread.currentThread())) { //if I own the lock increment depth acquire(forMerge); return true; } else { return false; } }
/** * If the lock is not acquired already acquire it and return true. * If it has been acquired already return false * Added for CR 2317 * called with true from the merge process, if true then the refresh will not refresh the object */ public synchronized boolean acquireNoWait(boolean forMerge) throws ConcurrencyException { if ((this.activeThread == null && this.numberOfReaders == 0) || (this.activeThread == Thread.currentThread())) { //if I own the lock increment depth acquire(forMerge); return true; } else { return false; } }
/** * If the lock is not acquired already acquire it and return true. * If it has been acquired already return false * Added for CR 2317 * called with true from the merge process, if true then the refresh will not refresh the object */ public synchronized boolean acquireNoWait(boolean forMerge) throws ConcurrencyException { if ((this.activeThread == null) || (this.activeThread == Thread.currentThread())) { //if I own the lock increment depth acquire(forMerge); return true; } else { return false; } }
/** * Acquire the lock on the cache key object. For the merge process * called with true from the merge process, if true then the refresh will not refresh the object */ public void acquire(boolean forMerge) { getMutex().acquire(forMerge); }
/** * Acquire the lock on the cache key object. */ public void acquire() { getMutex().acquire(false); }
/** * PUBLIC: * Start a transaction on the server. * A unit of work should normally be used instead of transactions for the remote session. */ public void beginTransaction() { // Acquire the mutex so session knows it is in a transaction. getTransactionMutex().acquire(); getRemoteConnection().beginTransaction(); }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }
/** * PUBLIC: * Start a transaction on the server. * A unit of work should normally be used instead of transactions for the remote session. */ @Override public void beginTransaction() { // Acquire the mutex so session knows it is in a transaction. getTransactionMutex().acquire(); startOperationProfile(SessionProfiler.Remote, null, SessionProfiler.ALL); getRemoteConnection().beginTransaction(); endOperationProfile(SessionProfiler.Remote, null, SessionProfiler.ALL); }
/** * PUBLIC: * Start a transaction on the server. * A unit of work should normally be used instead of transactions for the remote session. */ @Override public void beginTransaction() { // Acquire the mutex so session knows it is in a transaction. getTransactionMutex().acquire(); startOperationProfile(SessionProfiler.Remote, null, SessionProfiler.ALL); getRemoteConnection().beginTransaction(); endOperationProfile(SessionProfiler.Remote, null, SessionProfiler.ALL); }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (getSession().getDatasourceLogin().shouldSynchronizedReadOnWrite() || getSession().getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }