1 55 package org.lateralnz.c3d.util; 56 57 import java.io.Serializable ; 58 59 public class CacheOperation implements Serializable { 60 private static final String CACHE = "cache"; 61 private static final String KEY = "key"; 62 63 public static final byte CACHE_CHANGE = (byte)1; 64 public static final byte KEY_CHANGE = (byte)2; 65 public static final byte ALL_CHANGE = (byte)3; 66 67 public byte type; 68 public String cache = null; 69 public String data = null; 70 71 public CacheOperation(byte type, String cache, String data) { 72 this.type = type; 73 this.cache = cache; 74 this.data = data; 75 } 76 77 private String getTypeString() { 78 if (type == CACHE_CHANGE) { 79 return CACHE; 80 } 81 else { 82 return KEY; 83 } 84 } 85 86 public String toString() { 87 return getTypeString() + "::" + cache + "::" + data; 88 } 89 } | Popular Tags |