1 package org.jboss.cache.loader; 2 3 import java.io.IOException ; 4 import java.io.ObjectInput ; 5 import java.io.ObjectOutput ; 6 7 public class NodeDataExceptionMarker extends NodeData 8 { 9 10 private static final long serialVersionUID = 240199474174502551L; 11 private Throwable cause; 12 private Object cacheNodeIdentity; 13 14 public NodeDataExceptionMarker() 15 { 16 super(); 17 } 18 19 public NodeDataExceptionMarker(Throwable t,Object node) 20 { 21 cause = t; 22 cacheNodeIdentity = node; 23 } 24 25 public Throwable getCause() 26 { 27 return cause; 28 } 29 30 public Object getCacheNodeIdentity() 31 { 32 return cacheNodeIdentity; 33 } 34 35 public boolean isExceptionMarker() 36 { 37 return true; 38 } 39 40 public void writeExternal(ObjectOutput out) throws IOException 41 { 42 super.writeExternal(out); 43 out.writeObject(cause); 44 out.writeObject(cacheNodeIdentity); 45 } 46 47 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException 48 { 49 super.readExternal(in); 50 cause = (Throwable ) in.readObject(); 51 cacheNodeIdentity = in.readObject(); 52 } 53 } 54 | Popular Tags |