private void writeLockAll() { for (Object lock : this.locks) { ManagerUtil.monitorEnter(lock, writeLockLevel); } }
private void writeLockAll() { for (Object lock : this.locks) { ManagerUtil.monitorEnter(lock, writeLockLevel); } }
private void readLock(Object lock) { if(readLockLevel != LockLevel.NIL_LOCK_LEVEL) { ManagerUtil.monitorEnter(lock, readLockLevel); } }
private void readLock(Object lock) { if (readLockLevel != Util.NO_LOCK_LEVEL) ManagerUtil.monitorEnter(lock, readLockLevel); }
private void writeLockAll() { for (Object lock : this.locks) { ManagerUtil.monitorEnter(lock, writeLockLevel); } }
private void writeLockAll() { for (int i = 0; i < this.locks.length; i++) { ManagerUtil.monitorEnter(locks[i], writeLockLevel); } }
private void readLock(Object lock) { if (readLockLevel != Util.NO_LOCK_LEVEL) ManagerUtil.monitorEnter(lock, readLockLevel); }
private void readLock(Object lock) { if (readLockLevel != Util.NO_LOCK_LEVEL) ManagerUtil.monitorEnter(lock, readLockLevel); }
protected void __remove(K key) { String lockId = ls.getLock(key); ManagerUtil.monitorEnter(this, Manager.LOCK_TYPE_READ); ManagerUtil.monitorEnter(lockId, Manager.LOCK_TYPE_WRITE); try { super.__remove(key); }finally { ManagerUtil.monitorExit(lockId, Manager.LOCK_TYPE_WRITE); ManagerUtil.monitorExit(this, Manager.LOCK_TYPE_READ); } }
public final void setMaxIdleTimeMillis(Object key, long maxIdleTimeMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxIdleTimeMillis(key, maxIdleTimeMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
public final void setMaxTTLMillis(Object key, long maxTTLMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxTTLMillis(key, maxTTLMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
public final void setMaxTTLMillis(Object key, long maxTTLMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxTTLMillis(key, maxTTLMillis); } finally { ManagerUtil.monitorExit(lock); } }
public final void setMaxTTLMillis(Object key, long maxTTLMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxTTLMillis(key, maxTTLMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
public final void setMaxTTLMillis(Object key, long maxTTLMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxTTLMillis(key, maxTTLMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
public final void setMaxIdleTimeMillis(Object key, long maxIdleTimeMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxIdleTimeMillis(key, maxIdleTimeMillis); } finally { ManagerUtil.monitorExit(lock); } }
public final void setMaxIdleTimeMillis(Object key, long maxIdleTimeMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxIdleTimeMillis(key, maxIdleTimeMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
public final void setMaxIdleTimeMillis(Object key, long maxIdleTimeMillis) { Object lock = getLockObject(key); ManagerUtil.monitorEnter(lock, writeLockLevel); try { memoryStore.setMaxIdleTimeMillis(key, maxIdleTimeMillis); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
protected void __put(K key, V value) { String lockId = ls.getLock(key); ManagerUtil.monitorEnter(this, Manager.LOCK_TYPE_READ); ManagerUtil.monitorEnter(lockId, Manager.LOCK_TYPE_WRITE); try { SerializationAdaptor<K,V> adaptor = new TCSearializationAdaptor<K,V>(key, value, tsInfo.getMapLastModifiedTime()); adaptor.adaptAppToStore(); super.unlockedPut(adaptor, true); }finally { ManagerUtil.monitorExit(lockId, Manager.LOCK_TYPE_WRITE); ManagerUtil.monitorExit(this, Manager.LOCK_TYPE_READ); } }
private void removeInternal(final Object key) { if(key == null) { Assert.fail("Cannot remove cache element with null key"); } int storeIndex = getStoreIndex(key); Object lock = locks[storeIndex]; ManagerUtil.monitorEnter(lock, writeLockLevel); try { ((TCMap) store[storeIndex]).__tc_remove_logical(key); ((TCMap) dtmStore[storeIndex]).__tc_remove_logical(key); } finally { ManagerUtil.monitorExit(lock, writeLockLevel); } }
void updateTimestampIfNeeded(Object key, Element e) { Assert.pre(e != null); if (!isInvalidatorRunning() || (e.getTimeToIdle() <= 0)) { return; } if (needsUpdate(key, e)) { int storeIndex = getStoreIndex(key); ManagerUtil.monitorEnter(store[storeIndex], Manager.LOCK_TYPE_CONCURRENT); try { e.updateAccessStatistics(); updateExpireTime(key, e); } finally { ManagerUtil.monitorExit(store[storeIndex], Manager.LOCK_TYPE_CONCURRENT); } } }