KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > txn > LockGrantType


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: LockGrantType.java,v 1.18 2006/10/30 21:14:27 bostic Exp $
7  */

8
9 package com.sleepycat.je.txn;
10
11 /**
12  * LockGrantType is an enumeration of the possible results of a lock attempt.
13  */

14 public class LockGrantType {
15     private String JavaDoc name;
16
17     /* Grant types */
18     public static final LockGrantType NEW =
19     new LockGrantType("NEW");
20     public static final LockGrantType WAIT_NEW =
21     new LockGrantType("WAIT_NEW");
22     public static final LockGrantType PROMOTION =
23     new LockGrantType("PROMOTION");
24     public static final LockGrantType WAIT_PROMOTION =
25     new LockGrantType("WAIT_PROMOTION");
26     public static final LockGrantType EXISTING =
27     new LockGrantType("EXISTING");
28     public static final LockGrantType DENIED =
29     new LockGrantType("DENIED");
30     public static final LockGrantType WAIT_RESTART =
31     new LockGrantType("WAIT_RESTART");
32     public static final LockGrantType NONE_NEEDED =
33     new LockGrantType("NONE_NEEDED");
34
35     /* No lock types can be defined outside this class */
36     private LockGrantType(String JavaDoc name) {
37         this.name = name;
38     }
39
40     public String JavaDoc toString() {
41         return name;
42     }
43 }
44
Popular Tags