KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > shiftone > cache > decorator > cluster > ClearNotification


1 package org.shiftone.cache.decorator.cluster;
2
3
4
5 import org.shiftone.cache.Cache;
6
7
8 /**
9  * @version $Revision: 1.4 $
10  * @author <a HREF="mailto:jeff@shiftone.org">Jeff Drost</a>
11  */

12 public class ClearNotification implements Notification
13 {
14
15     private final long senderInstanceId;
16     private final String JavaDoc cacheName;
17
18     public ClearNotification(long senderInstanceId, String JavaDoc cacheName)
19     {
20         this.senderInstanceId = senderInstanceId;
21         this.cacheName = cacheName;
22     }
23
24
25     public void execute(Cache cache)
26     {
27         cache.clear();
28     }
29
30
31     public String JavaDoc getCacheName()
32     {
33         return cacheName;
34     }
35
36
37     public long getSenderInstanceId()
38     {
39         return senderInstanceId;
40     }
41
42
43     public String JavaDoc toString()
44     {
45         return "clear()";
46     }
47 }
48
Popular Tags