2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 2001, 2012 Oracle and/or its affiliates. All rights reserved.
9 package com.sleepycat.db;
11 import com.sleepycat.db.internal.DbLock;
14 * The locking interfaces for the database environment are methods of the
15 * {@link com.sleepycat.db.Environment Environment} handle. The {@link
16 * com.sleepycat.db.Lock Lock} object is the handle for a single lock, and has
17 * no methods of its own.
19 public final class Lock {
20 private DbLock dbLock;
22 private Lock(final DbLock inLock) {
24 inLock.wrapper = this;
28 static Lock wrap(final DbLock dblock) {
29 return (dblock == null) ? null : new Lock(dblock);