1 9 package org.ozoneDB; 10 11 12 19 public class TransactionException extends OzoneRemoteException { 20 21 public final static int UNKNOWN = 0; 22 23 26 public final static int STATE = 1; 27 28 31 public final static int ROLLBACK = 2; 32 33 37 public final static int OPTIMISTIC = 3; 38 39 43 public final static int UNEXPECTED = 4; 44 45 48 public final static int STOPPED = 5; 49 50 51 protected int code; 52 53 54 public TransactionException() { 55 } 56 57 58 public TransactionException( String s ) { 59 super( s ); 60 code = UNKNOWN; 61 } 62 63 public TransactionException(String msg, Throwable cause) { 64 super(msg, cause); 65 } 66 67 public TransactionException(Throwable cause) { 68 super(cause); 69 } 70 71 public TransactionException( String s, int _code ) { 72 super( s ); 73 code = _code; 74 } 75 76 77 public int code() { 78 return code; 79 } 80 81 82 public String toString() { 83 return super.toString() + " [code: " + code + "]"; 84 } 85 } 86 | Popular Tags |