00001
00002
00003
00004
00005
00006
00007
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
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
00040 int getFlag() {
00041 return flag;
00042 }
00043 }