Index: Lock.java =================================================================== RCS file: /home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/store/Lock.java,v retrieving revision 1.12 diff -u -r1.12 Lock.java --- Lock.java 11 May 2004 17:43:28 -0000 1.12 +++ Lock.java 10 Nov 2004 05:50:25 -0000 @@ -36,6 +36,13 @@ public abstract class Lock { public static long LOCK_POLL_INTERVAL = 1000; + /** + * new field to hold name of this lock - only used + * for custom locks...added by Jeff Patterson NOV-08-2004 + * getter and setter methods added for this member as well + */ + private String lockName = null; + /** Attempts to obtain exclusive access and immediately return * upon success or failure. * @return true iff exclusive access is obtained @@ -74,6 +81,20 @@ * still call {@link #obtain()} before using the resource. */ public abstract boolean isLocked(); + /** + * getter for unique lock name + */ + protected String getLockName() { + return lockName; + } + + /** + * setter for the unique lock name + * @param value unique value to assign lock name + */ + protected void setLockName(String value) { + lockName = value; + } /** Utility class for executing code with exclusive access. */ public abstract static class With { @@ -115,3 +136,4 @@ } } +