Package com.sleepycat.je

Examples of com.sleepycat.je.DatabaseException


     * Return the key for this duplicate set.
     */
    public byte[] getDupKey()
        throws DatabaseException {

        throw new DatabaseException(shortClassName() + ".getDupKey() called");
    }
View Full Code Here


        if (entryTargets[idx] == null) {
            /* Fault object in from log. */
            long lsn = getLsn(idx);
            if (lsn == DbLsn.NULL_LSN) {
                if (!isEntryKnownDeleted(idx)) {
                    throw new DatabaseException(makeFetchErrorMsg
                        ("NULL_LSN without KnownDeleted", this, lsn,
                         entryStates[idx]));
                }

                /*
                 * Ignore a NULL_LSN (return null) if KnownDeleted is set.
                 * This is the remnant of an incomplete insertion -- see
                 * Tree.insert. [#13126]
                 */
            } else {
                try {
                    EnvironmentImpl env = databaseImpl.getDbEnvironment();
                    Node node = (Node) env.getLogManager().get(lsn);
                    node.postFetchInit(databaseImpl, lsn);
                    entryTargets[idx] = node;
                    updateMemorySize(null, node);
                } catch (LogFileNotFoundException LNFE) {
                    if (!isEntryKnownDeleted(idx) &&
                        !isEntryPendingDeleted(idx)) {
                        throw new DatabaseException
                            (makeFetchErrorMsg(LNFE.toString(),
                                               this,
                                               lsn,
                                               entryStates[idx]));
                    }

                    /*
                     * Ignore. Cleaner got to the log file, so just return
                     * null.  It is safe to ignore a deleted file for a
                     * pendingDeleted entry because the cleaner will not clean
                     * files with active transactions.
                     */
                } catch (Exception e) {
                    throw new DatabaseException
                        (makeFetchErrorMsg(e.toString(), this, lsn,
                                           entryStates[idx]),
                         e);
                }
            }
View Full Code Here

    void accountForSubtreeRemoval(INList inList,
                                  UtilizationTracker tracker)
        throws DatabaseException {

        if (nEntries > 1) {
            throw new DatabaseException
                ("Found non-deletable IN " + getNodeId() +
                 " while flushing INList. nEntries = " + nEntries);
        }

        /* Remove self. */
 
View Full Code Here

     * ever called.
     */
    public void addToQueue(Object o)
        throws DatabaseException {

        throw new DatabaseException
            ("Cleaner.addToQueue should never be called.");
    }
View Full Code Here

                nFilesCleaned += 1;
                accumulatePerRunCounters();
                finished = true;
            } catch (IOException IOE) {
                Tracer.trace(env, "Cleaner", "doClean", "", IOE);
                throw new DatabaseException(IOE);
            } finally {
                currentFile = null;
                String traceMsg =
                    "CleanerRun " + nCleanerRuns +
                    " on file 0x" + Long.toHexString(fileNumValue) +
View Full Code Here

      if (!resyncReader(DbLsn.makeLsn
            (prevFileNum.longValue(),
                       DbLsn.MAX_FILE_OFFSET),
            false)) {

          throw new DatabaseException
        ("Cannot read backward over cleaned file" +
         " from " + readBufferFileNum +
         " to " + prevFileNum);
      }
        }
View Full Code Here

            } else {
                throw new EOFException();
            }
        } catch (IOException e) {
            e.printStackTrace();
            throw new DatabaseException
    ("Problem in fillReadBuffer, readBufferFileNum = " +
     readBufferFileNum + ": " + e.getMessage());

        } finally {
            if (fileHandle != null) {
View Full Code Here

                }
            } else {
                obsoleteLsn = LogUtils.readLong(entryBuffer);
            }
        } catch (IllegalAccessException e) {
            throw new DatabaseException(e);
        } catch (InstantiationException e) {
            throw new DatabaseException(e);
        }
    }
View Full Code Here

        try {
            item = (LogReadable) logClass.newInstance();
            item.readFromLog(entryBuffer, entryTypeVersion);
        } catch (IllegalAccessException e) {
            throw new DatabaseException(e);
        } catch (InstantiationException e) {
            throw new DatabaseException(e);
        }
    }
View Full Code Here

  throws DatabaseException {

        try {
            return (LogEntry) logClass.newInstance();
        } catch (InstantiationException e){
            throw new DatabaseException(e);
        } catch (IllegalAccessException e){
            throw new DatabaseException(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.je.DatabaseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.