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

MemoryException.java

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1999-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: MemoryException.java,v 12.1 2005/06/16 20:23:02 bostic Exp $
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 }

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