01: package org.shiftone.cache.decorator.cluster;
02:
03: import org.shiftone.cache.Cache;
04:
05: /**
06: * @version $Revision: 1.4 $
07: * @author <a href="mailto:jeff@shiftone.org">Jeff Drost</a>
08: */
09: public class ClearNotification implements Notification {
10:
11: private final long senderInstanceId;
12: private final String cacheName;
13:
14: public ClearNotification(long senderInstanceId, String cacheName) {
15: this .senderInstanceId = senderInstanceId;
16: this .cacheName = cacheName;
17: }
18:
19: public void execute(Cache cache) {
20: cache.clear();
21: }
22:
23: public String getCacheName() {
24: return cacheName;
25: }
26:
27: public long getSenderInstanceId() {
28: return senderInstanceId;
29: }
30:
31: public String toString() {
32: return "clear()";
33: }
34: }
|