Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

LockRequestMode.java

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 2002-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: LockRequestMode.java,v 12.1 2005/06/16 20:23:02 bostic Exp $
00008  */
00009 
00010 package com.sleepycat.db;
00011 
00012 import com.sleepycat.db.internal.DbConstants;
00013 
00014 public final class LockRequestMode {
00015     public static final LockRequestMode READ =
00016         new LockRequestMode("READ", DbConstants.DB_LOCK_READ);
00017     public static final LockRequestMode WRITE =
00018         new LockRequestMode("WRITE", DbConstants.DB_LOCK_WRITE);
00019     public static final LockRequestMode IWRITE =
00020         new LockRequestMode("IWRITE", DbConstants.DB_LOCK_IWRITE);
00021     public static final LockRequestMode IREAD =
00022         new LockRequestMode("IREAD", DbConstants.DB_LOCK_IREAD);
00023     public static final LockRequestMode IWR =
00024         new LockRequestMode("IWR", DbConstants.DB_LOCK_IWR);
00025 
00026     /* package */
00027     private final String operationName;
00028     private final int flag;
00029 
00030     public LockRequestMode(final String operationName, final int flag) {
00031         this.operationName = operationName;
00032         this.flag = flag;
00033     }
00034 
00035     public String toString() {
00036         return "LockRequestMode." + operationName;
00037     }
00038 
00039     /* package */
00040     int getFlag() {
00041         return flag;
00042     }
00043 }

Generated on Sun Dec 25 12:14:33 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2