/** * {@inheritDoc} */ public void write(Element element) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The element '" + element + "' couldn't be added through the write-behind queue for cache '" + cacheName + "' since it's not started."); } addItem(new WriteOperation(element)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(CacheEntry entry) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The entry for key '" + entry.getKey() + "' couldn't be deleted through the write-behind " + "queue for cache '" + cacheName + "' since it's not started."); } addItem(new DeleteOperation(entry)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void write(Element element) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The element '" + element + "' couldn't be added through the write-behind queue for cache '" + cacheName + "' since it's not started."); } addItem(new WriteOperation(element)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void write(Element element) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The element '" + element + "' couldn't be added through the write-behind queue for cache '" + cacheName + "' since it's not started."); } addItem(new WriteOperation(element)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void write(Element element) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The element '" + element + "' couldn't be added through the write-behind queue for cache '" + cacheName + "' since it's not started."); } addItem(new WriteOperation(element)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(CacheEntry entry) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The entry for key '" + entry.getKey() + "' couldn't be deleted through the write-behind " + "queue for cache '" + cacheName + "' since it's not started."); } addItem(new DeleteOperation(entry)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(CacheEntry entry) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The entry for key '" + entry.getKey() + "' couldn't be deleted through the write-behind " + "queue for cache '" + cacheName + "' since it's not started."); } addItem(new DeleteOperation(entry)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }
/** * {@inheritDoc} */ public void delete(CacheEntry entry) { queueWriteLock.lock(); try { waitForQueueSizeToDrop(); if (stopping || stopped) { throw new CacheException("The entry for key '" + entry.getKey() + "' couldn't be deleted through the write-behind " + "queue for cache '" + cacheName + "' since it's not started."); } addItem(new DeleteOperation(entry)); if (getQueueSize() + 1 < maxQueueSize) { queueIsFull.signal(); } queueIsEmpty.signal(); } finally { queueWriteLock.unlock(); } }