00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.sleepycat.db;
00010
00011 import com.sleepycat.db.internal.DbEnv;
00012
00013 public class MemoryException extends DatabaseException {
00014 private DatabaseEntry dbt = null;
00015 private String message;
00016
00017 protected MemoryException(final String s,
00018 final DatabaseEntry dbt,
00019 final int errno,
00020 final DbEnv dbenv) {
00021 super(s, errno, dbenv);
00022 this.message = s;
00023 this.dbt = dbt;
00024 }
00025
00026 public DatabaseEntry getDatabaseEntry() {
00027 return dbt;
00028 }
00029
00030 public String toString() {
00031 return message;
00032 }
00033
00034 void updateDatabaseEntry(final DatabaseEntry newEntry) {
00035 if (this.dbt == null) {
00036 this.message = "DatabaseEntry not large enough for available data";
00037 this.dbt = newEntry;
00038 }
00039 }
00040 }