KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > loader > NodeDataExceptionMarker


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