001
014
015 package com.liferay.portal.cache.keypool;
016
017 import com.liferay.portal.kernel.cache.CacheListener;
018 import com.liferay.portal.kernel.cache.PortalCache;
019
020 import java.io.Serializable;
021
022
026 public class MultiVMKeyPoolCacheListener implements CacheListener {
027
028 public MultiVMKeyPoolCacheListener(PortalCache localPortalCache) {
029 _localPortalCache = localPortalCache;
030 }
031
032 public void notifyEntryEvicted(
033 PortalCache portalCache, Serializable key, Object value) {
034
035 _localPortalCache.remove(key);
036 }
037
038 public void notifyEntryExpired(
039 PortalCache portalCache, Serializable key, Object value) {
040
041 _localPortalCache.remove(key);
042 }
043
044 public void notifyEntryPut(
045 PortalCache portalCache, Serializable key, Object value) {
046
047 _localPortalCache.put(key, value);
048 }
049
050 public void notifyEntryRemoved(
051 PortalCache portalCache, Serializable key, Object value) {
052
053 _localPortalCache.remove(key);
054 }
055
056 public void notifyEntryUpdated(
057 PortalCache portalCache, Serializable key, Object value) {
058
059 _localPortalCache.put(key, value);
060 }
061
062 public void notifyRemoveAll(PortalCache portalCache) {
063 _localPortalCache.removeAll();
064 }
065
066 private PortalCache _localPortalCache;
067
068 }