1 28 29 package org.apache.commons.transaction.locking; 30 31 37 public class LockException extends RuntimeException { 38 39 42 public static final int CODE_INTERRUPTED = 1; 43 44 47 public static final int CODE_TIMED_OUT = 2; 48 49 52 public static final int CODE_DEADLOCK_VICTIM = 3; 53 54 protected Object resourceId; 55 56 protected String reason; 57 58 protected int code; 59 60 public LockException(String reason, int code, Object resourceId) { 61 this.reason = reason; 62 this.code = code; 63 this.resourceId = resourceId; 64 } 65 66 72 public int getCode() { 73 return code; 74 } 75 76 81 public Object getResourceId() { 82 return resourceId; 83 } 84 85 90 public String getReason() { 91 return reason; 92 } 93 } | Popular Tags |