1 22 package org.jboss.ejb; 23 24 import java.io.ObjectOutput ; 25 import java.io.ObjectInput ; 26 import java.io.IOException ; 27 28 35 public final class ListCacheKey 36 extends CacheKey 37 { 38 40 42 45 private long listId; 46 47 50 private int index; 51 52 54 56 public ListCacheKey() { 57 } 59 60 64 public ListCacheKey(Object id, long listId, int index) { 65 super(id); 66 this.listId = listId; 67 this.index = index; 68 } 69 70 public long getListId() 71 { 72 return listId; 73 } 74 75 public int getIndex() 76 { 77 return index; 78 } 79 80 82 84 86 88 public void writeExternal(ObjectOutput out) 89 throws IOException 90 { 91 super.writeExternal(out); 92 out.writeLong(listId); 93 out.writeInt(index); 94 } 95 96 public void readExternal(ObjectInput in) 97 throws IOException , ClassNotFoundException 98 { 99 super.readExternal(in); 100 listId = in.readLong(); 101 index = in.readInt(); 102 } 103 104 } 106 | Popular Tags |