Package com.sleepycat.je

Examples of com.sleepycat.je.DatabaseException


    loader.setDbName(dbNameBase + i);
    loader.load();
    is.close();
      }
        } catch (IOException IOE) {
      throw new DatabaseException(IOE);
  }
    }
View Full Code Here


      int current = raf.read();
      raf.seek(fileOffset);
      raf.write(current + 1);
      raf.close();
  } catch (IOException IOE) {
      throw new DatabaseException(IOE);
  }
    }
View Full Code Here

        while (true) {
      if (waitTarget.active) {
          if (thread == owner) {
        break;
          } else {
        throw new DatabaseException
            ("waitTarget.active but not owner");
          }
      } else {
          waitTarget.wait();
          if (thread == owner) {
View Full Code Here

        if (target == null) {
            /* fault object in from log */
            if (lsn == DbLsn.NULL_LSN) {
                if (!isKnownDeleted()) {
                    throw new DatabaseException(IN.makeFetchErrorMsg
                        ("NULL_LSN without KnownDeleted", in, lsn, state));
                }
                /* Ignore a NULL_LSN (return null) if KnownDeleted is set. */
            } else {
                try {
                    EnvironmentImpl env = database.getDbEnvironment();
                    Node node = (Node) env.getLogManager().get(lsn);
                    node.postFetchInit(database, lsn);
                    target = node;
                    if (in != null) {
                        in.updateMemorySize(null, target);
                    }
                } catch (LogFileNotFoundException LNFE) {
                    if (!isKnownDeleted() && !isPendingDeleted()) {
                        throw new DatabaseException
                            (IN.makeFetchErrorMsg
                                (LNFE.toString(), in, lsn, state),
                             LNFE);
                    }
                    /* Ignore. Cleaner got to it, so just return null. */
                } catch (Exception e) {
                    throw new DatabaseException
                        (IN.makeFetchErrorMsg(e.toString(), in, lsn, state),
                         e);
                }
            }
        }
View Full Code Here

        throws DatabaseException {

        String strId = new String(id);
        ObjectStreamClass desc = (ObjectStreamClass) idToDescMap.get(strId);
        if (desc == null) {
            throw new DatabaseException("classID not found");
        }
        return desc;
    }
View Full Code Here

                 * or it might not succeed if the record alread exists
                 * and the database was not configured for duplicate
                 * records.
                 */
                if (status != OperationStatus.SUCCESS) {
                    throw new DatabaseException("Data insertion got status " +
                                                status);
                }
                txn.commit();
            }
        } else {
View Full Code Here

                 * information. For example, the put might succeed,
                 * or it might not succeed if the record exists
                 * and duplicates were not
                 */
                if (status != OperationStatus.SUCCESS) {
                    throw new DatabaseException("Data insertion got status " +
                                                status);
                }
                txn.commit();
            }
        } else {
View Full Code Here

                 * return conveys a variety of information. For example, the
                 * put might succeed, or it might not succeed if the record
                 * exists and duplicates were not
                 */
                if (status != OperationStatus.SUCCESS) {
                    throw new DatabaseException
      ("Data insertion got status " + status);
                }
                txn.commit();
            }
        } else {
View Full Code Here

        /*
         * A post commit exception that needs to be propagated back to the
         * caller. Its throw is delayed until the post commit cleanup has been
         * completed.
         */
        DatabaseException queuedPostCommitException = null;

        this.commitDurability = durability;

        try {

View Full Code Here

                                      DatabaseEntry data,
                                      LockMode lockMode)
        throws DatabaseException {

        if (!initialized) {
            throw new DatabaseException("Cursor not initialized");
        }
        OperationStatus status;
        if (!range.hasBound()) {
            setParams(key, pKey, data);
            status = doGetNextDup(lockMode);
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.