/** * Called immediately after an attempt to remove an element. The remove method will block until * this method returns. * <p> * This notification is received regardless of whether the cache had an element matching * the removal key or not. If an element was removed, the element is passed to this method, * otherwise a synthetic element, with only the key set is passed in. * <p> * * @param cache the cache emitting the notification * @param element the element just deleted, or a synthetic element with just the key set if * no element was removed.param element just deleted */ public void notifyElementRemoved(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicateRemovals) { return; } if (!element.isKeySerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Key " + element.getObjectKey() + " is not Serializable and cannot be replicated."); } return; } replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); }
/** * Called immediately after an element has been put into the cache. The {@link net.sf.ehcache.Cache#put(net.sf.ehcache.Element)} method * will block until this method returns. * <p> * Implementers may wish to have access to the Element's fields, including value, so the element is provided. * Implementers should be careful not to modify the element. The effect of any modifications is undefined. * * @param cache the cache emitting the notification * @param element the element which was just put into the cache. */ public void notifyElementPut(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicatePuts) { return; } if (!element.isSerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Object with key " + element.getObjectKey() + " is not Serializable and cannot be replicated"); } return; } if (replicatePutsViaCopy) { replicatePutNotification(cache, element); } else { replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); } }
replicateRemovalNotification(cache, (Serializable) element.getObjectKey());
/** * Called immediately after an attempt to remove an element. The remove method will block until * this method returns. * <p/> * This notification is received regardless of whether the cache had an element matching * the removal key or not. If an element was removed, the element is passed to this method, * otherwise a synthetic element, with only the key set is passed in. * <p/> * * @param cache the cache emitting the notification * @param element the element just deleted, or a synthetic element with just the key set if * no element was removed.param element just deleted */ public void notifyElementRemoved(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicateRemovals) { return; } if (!element.isKeySerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Key " + element.getObjectKey() + " is not Serializable and cannot be replicated."); } return; } replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); }
/** * Called immediately after an attempt to remove an element. The remove method will block until * this method returns. * <p> * This notification is received regardless of whether the cache had an element matching * the removal key or not. If an element was removed, the element is passed to this method, * otherwise a synthetic element, with only the key set is passed in. * <p> * * @param cache the cache emitting the notification * @param element the element just deleted, or a synthetic element with just the key set if * no element was removed.param element just deleted */ public void notifyElementRemoved(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicateRemovals) { return; } if (!element.isKeySerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Key " + element.getObjectKey() + " is not Serializable and cannot be replicated."); } return; } replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); }
/** * Called immediately after an attempt to remove an element. The remove method will block until * this method returns. * <p/> * This notification is received regardless of whether the cache had an element matching * the removal key or not. If an element was removed, the element is passed to this method, * otherwise a synthetic element, with only the key set is passed in. * <p/> * * @param cache the cache emitting the notification * @param element the element just deleted, or a synthetic element with just the key set if * no element was removed.param element just deleted */ public void notifyElementRemoved(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicateRemovals) { return; } if (!element.isKeySerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Key " + element.getObjectKey() + " is not Serializable and cannot be replicated."); } return; } replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); }
/** * Called immediately after an element has been put into the cache. The {@link net.sf.ehcache.Cache#put(net.sf.ehcache.Element)} method * will block until this method returns. * <p/> * Implementers may wish to have access to the Element's fields, including value, so the element is provided. * Implementers should be careful not to modify the element. The effect of any modifications is undefined. * * @param cache the cache emitting the notification * @param element the element which was just put into the cache. */ public void notifyElementPut(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicatePuts) { return; } if (!element.isSerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Object with key " + element.getObjectKey() + " is not Serializable and cannot be replicated"); } return; } if (replicatePutsViaCopy) { replicatePutNotification(cache, element); } else { replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); } }
/** * Called immediately after an element has been put into the cache. The {@link net.sf.ehcache.Cache#put(net.sf.ehcache.Element)} method * will block until this method returns. * <p> * Implementers may wish to have access to the Element's fields, including value, so the element is provided. * Implementers should be careful not to modify the element. The effect of any modifications is undefined. * * @param cache the cache emitting the notification * @param element the element which was just put into the cache. */ public void notifyElementPut(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicatePuts) { return; } if (!element.isSerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Object with key " + element.getObjectKey() + " is not Serializable and cannot be replicated"); } return; } if (replicatePutsViaCopy) { replicatePutNotification(cache, element); } else { replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); } }
/** * Called immediately after an element has been put into the cache. The {@link net.sf.ehcache.Cache#put(net.sf.ehcache.Element)} method * will block until this method returns. * <p/> * Implementers may wish to have access to the Element's fields, including value, so the element is provided. * Implementers should be careful not to modify the element. The effect of any modifications is undefined. * * @param cache the cache emitting the notification * @param element the element which was just put into the cache. */ public void notifyElementPut(final Ehcache cache, final Element element) throws CacheException { if (notAlive()) { return; } if (!replicatePuts) { return; } if (!element.isSerializable()) { if (LOG.isWarnEnabled()) { LOG.warn("Object with key " + element.getObjectKey() + " is not Serializable and cannot be replicated"); } return; } if (replicatePutsViaCopy) { replicatePutNotification(cache, element); } else { replicateRemovalNotification(cache, (Serializable) element.getObjectKey()); } }
replicateRemovalNotification(cache, (Serializable) element.getObjectKey());
replicateRemovalNotification(cache, (Serializable) element.getObjectKey());
replicateRemovalNotification(cache, (Serializable) element.getObjectKey());