/** * This function is having a default visiblity as it is used in the * OplogJUnitTest for a bug verification of Bug # 35012 * * All callers must have {@link #releaseWriteLock(DiskRegion)} in a matching * finally block. * * Note that this is no longer implemented by getting a write lock but instead * locks the same lock that acquireReadLock does. * * @since 5.1 */ private void acquireWriteLock(DiskRegion dr) { // @todo darrel: this is no longer a write lock need to change method name dr.acquireWriteLock(); }
/** * This function is having a default visiblity as it is used in the * OplogJUnitTest for a bug verification of Bug # 35012 * * All callers must have {@link #releaseWriteLock(DiskRegion)} in a matching * finally block. * * Note that this is no longer implemented by getting a write lock but instead * locks the same lock that acquireReadLock does. * * @since 5.1 */ private void acquireWriteLock(DiskRegion dr) { // @todo darrel: this is no longer a write lock need to change method name dr.acquireWriteLock(); }
public void run() { Cache cache = CacheFactory.getAnyInstance(); region.getDiskRegion().acquireWriteLock(); try { Thread putThread = new Thread(new putThread(region)); putThread.start(); Thread.sleep(2000); synchronized (mutex) { mutex.notify(); } Thread.sleep(5000); region.clear(); } catch (InterruptedException e) { if (cache.getLogger().fineEnabled()) { cache.getLogger().fine( "TestLRUClockHand#clearThread Got an interrupted Exception"); } fail("interrupted"); } catch (Exception ie) { fail("TestLRUClockHand#clearThread Got an Exception"); } finally { region.getDiskRegion().releaseWriteLock(); } } }
lr.getDiskRegion().acquireWriteLock();
((LocalRegion)region).getDiskRegion().acquireWriteLock(); try { th.start();