1 package org.shiftone.cache.decorator.cluster; 2 3 4 5 import org.shiftone.cache.Cache; 6 7 8 12 public class ClearNotification implements Notification 13 { 14 15 private final long senderInstanceId; 16 private final String cacheName; 17 18 public ClearNotification(long senderInstanceId, String 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 getCacheName() 32 { 33 return cacheName; 34 } 35 36 37 public long getSenderInstanceId() 38 { 39 return senderInstanceId; 40 } 41 42 43 public String toString() 44 { 45 return "clear()"; 46 } 47 } 48 | Popular Tags |