| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public TerracottaCacheEventReplication | clone()
Overrides java. Implements net. |
| private CacheEventListener | |
| public void | dispose()
Implements net. |
| public void | notifyElementEvicted(Ehcache
the cache emitting the notification cache, Element the element that has just been evicted element)Implements net. |
| public void | notifyElementExpired(Ehcache
the cache emitting the notification cache, Element the element that has just expired
element)
Deadlock Warning: expiry will often come from the Implements net. |
| public void | notifyElementPut(Ehcache
the cache emitting the notification cache, Element the element which was just put into the cache. element)Implements net. |
| public void | notifyElementRemoved(Ehcache
the cache emitting the notification cache, Element the element just deleted, or a synthetic element with just the key set if
no element was removed. element)Implements net. |
| public void | notifyElementUpdated(Ehcache
the cache emitting the notification cache, Element the element which was just put into the cache. element)Implements net. |
| public void | notifyRemoveAll(Ehcache
the cache emitting the notification cache)Implements net. net. to indicate that the all
elements have been removed from the cache in a bulk operation.
|
| replicators | back to summary |
|---|---|
| private final ConcurrentMap<Ehcache, CacheEventListener> replicators | |
| TerracottaCacheEventReplication | back to summary |
|---|---|
| public TerracottaCacheEventReplication() | |
| clone | back to summary |
|---|---|
| public TerracottaCacheEventReplication clone() throws CloneNotSupportedException Overrides java. Implements net. Doc from net. Creates a clone of this listener. This method will only be called by ehcache before a cache is initialized. This may not be possible for listeners after they have been initialized. Implementations should throw CloneNotSupportedException if they do not support clone.
| |
| createCacheEventReplicator | back to summary |
|---|---|
| private CacheEventListener createCacheEventReplicator(Ehcache cache) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements net. Doc from net. Give the listener a chance to cleanup and free resources when no longer needed | |
| notifyElementEvicted | back to summary |
|---|---|
| public void notifyElementEvicted(Ehcache cache, Element element) Implements net. Doc from net. Called immediately after an element is evicted from the cache. Evicted in this sense means evicted from one store and not moved to another, so that it exists nowhere in the local cache. In a sense the Element has been removed from the cache, but it is different, thus the separate notification. | |
| notifyElementExpired | back to summary |
|---|---|
| public void notifyElementExpired(Ehcache cache, Element element) Implements net. Doc from net. Called immediately after an element is found to be expired. The
Elements are checked for expiry in ehcache at the following times:
| |
| notifyElementPut | back to summary |
|---|---|
| public void notifyElementPut(Ehcache cache, Element element) throws CacheException Implements net. Doc from net. Called immediately after an element has been put into the cache. The
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. | |
| notifyElementRemoved | back to summary |
|---|---|
| public void notifyElementRemoved(Ehcache cache, Element element) throws CacheException Implements net. Doc from net. Called immediately after an attempt to remove an element. The remove method will block until this method returns. 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. This notification is not called for the following special cases:
| |
| notifyElementUpdated | back to summary |
|---|---|
| public void notifyElementUpdated(Ehcache cache, Element element) throws CacheException Implements net. Doc from net. Called immediately after an element has been put into the cache and the element already existed in the cache. This is thus an update.
The 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. | |
| notifyRemoveAll | back to summary |
|---|---|
| public void notifyRemoveAll(Ehcache cache) Implements net. Doc from net. Called during This notification exists because clearing a cache is a special case. It is often not practical to serially process notifications where potentially millions of elements have been bulk deleted.
| |