1 |
| package org.jboss.cache.marshall; |
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 |
2
| public NodeDataExceptionMarker()
|
15 |
| { |
16 |
2
| super();
|
17 |
| } |
18 |
| |
19 |
2
| public NodeDataExceptionMarker(Throwable t, Object node)
|
20 |
| { |
21 |
2
| cause = t;
|
22 |
2
| cacheNodeIdentity = node;
|
23 |
| } |
24 |
| |
25 |
0
| public Throwable getCause()
|
26 |
| { |
27 |
0
| return cause;
|
28 |
| } |
29 |
| |
30 |
0
| public Object getCacheNodeIdentity()
|
31 |
| { |
32 |
0
| return cacheNodeIdentity;
|
33 |
| } |
34 |
| |
35 |
0
| public boolean isExceptionMarker()
|
36 |
| { |
37 |
0
| return true;
|
38 |
| } |
39 |
| |
40 |
2
| public void writeExternal(ObjectOutput out) throws IOException
|
41 |
| { |
42 |
2
| super.writeExternal(out);
|
43 |
2
| out.writeObject(cause);
|
44 |
2
| out.writeObject(cacheNodeIdentity);
|
45 |
| } |
46 |
| |
47 |
2
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
|
48 |
| { |
49 |
2
| super.readExternal(in);
|
50 |
2
| cause = (Throwable) in.readObject();
|
51 |
2
| cacheNodeIdentity = in.readObject();
|
52 |
| } |
53 |
| |
54 |
0
| public String toString()
|
55 |
| { |
56 |
0
| return "NodeDataExceptionMarker";
|
57 |
| } |
58 |
| } |