00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.sleepycat.db.internal;
00010
00011 import com.sleepycat.db.*;
00012 import java.util.Comparator;
00013
00014 public class DbLock {
00015 private long swigCPtr;
00016 protected boolean swigCMemOwn;
00017
00018 protected DbLock(long cPtr, boolean cMemoryOwn) {
00019 swigCMemOwn = cMemoryOwn;
00020 swigCPtr = cPtr;
00021 }
00022
00023 protected static long getCPtr(DbLock obj) {
00024 return (obj == null) ? 0 : obj.swigCPtr;
00025 }
00026
00027 protected void finalize() {
00028 try {
00029 delete();
00030 } catch(Exception e) {
00031 System.err.println("Exception during finalization: " + e);
00032 e.printStackTrace(System.err);
00033 }
00034 }
00035
00036 void delete() {
00037 if(swigCPtr != 0 && swigCMemOwn) {
00038 swigCMemOwn = false;
00039 db_javaJNI.delete_DbLock(swigCPtr);
00040 }
00041 swigCPtr = 0;
00042 }
00043
00044 public Lock wrapper;
00045
00046 }