KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgroups > blocks > LockingException


1 // $Id: LockingException.java,v 1.1.1.1 2003/09/09 01:24:08 belaban Exp $
2

3
4 package org.jgroups.blocks;
5
6 import java.util.Map JavaDoc;
7
8
9 public class LockingException extends Exception JavaDoc {
10     Map JavaDoc failed_lockers=null; // list of members who failed acquiring locks (keys=Address, values=exception string)
11

12     public LockingException(String JavaDoc msg) {
13     super(msg);
14     }
15
16     public LockingException(Map JavaDoc m) {
17         super("LockingException");
18         failed_lockers=m;
19     }
20
21     
22     public String JavaDoc toString() {
23         StringBuffer JavaDoc sb=new StringBuffer JavaDoc();
24
25         sb.append(super.toString());
26
27         if(failed_lockers != null && failed_lockers.size() > 0)
28             sb.append(" (failed members: ").append(failed_lockers);
29         return sb.toString();
30     }
31     
32 }
33
Popular Tags