1 19 package org.fjank.jcache.distribution; 20 21 26 27 import java.io.Serializable ; 28 29 36 public class ClusterNotification implements Serializable 37 { 38 public static final int OBJECT_UPDATED = 1; 39 public static final int OBJECT_ADDED = 2; 40 public static final int OBJECT_INVALIDATED = 3; 41 42 45 protected Serializable data; 46 47 50 protected int type; 51 52 protected String region; 53 protected String group; 54 55 62 public ClusterNotification(String region, 63 String group, 64 int type, 65 Serializable data) 66 { 67 this.type = type; 68 this.data = data; 69 this.region = region; 70 this.group = group; 71 } 72 73 76 public Serializable getData() 77 { 78 return data; 79 } 80 81 84 public int getType() 85 { 86 return type; 87 } 88 89 public String getRegionName() 90 { 91 return region; 92 } 93 94 public String getGroupName() 95 { 96 return group; 97 } 98 99 public String toString() 100 { 101 StringBuffer buf = new StringBuffer (); 102 buf.append("type=").append(type).append(", data=").append(data); 103 104 return buf.toString(); 105 } 106 } 107 108 | Popular Tags |