Package com.sleepycat.je

Examples of com.sleepycat.je.DatabaseException


        throws DatabaseException {

        try {
            return (LogEntry) logEntry.clone();
        } catch (CloneNotSupportedException e) {
            throw new DatabaseException(e);
        }
    }
View Full Code Here


                                    Set allowedProps,
                                    String apiMethod)
        throws DatabaseException {

        if (!allowedProps.contains(propName)) {
            throw new DatabaseException
    (propName + " is not a valid property for " + apiMethod);
        }
    }
View Full Code Here

     */
    private synchronized PackedOffsets putFileSummary(TrackedFileSummary tfs)
        throws DatabaseException {

        if (env.isReadOnly()) {
            throw new DatabaseException
                ("Cannot write file summary in a read-only environment");
        }

        if (tfs.isEmpty()) {
            return null; // no delta
View Full Code Here

                    potentialParent = result.parent;
                }
            } catch (Exception e) {
                potentialParent.releaseLatchIfOwner();

                throw new DatabaseException(e);
            }
        }
        return result;
    }
View Full Code Here

                searchResult.releaseLatchIfOwner();
                msg.append("searchResult=" + searchResult.getClass() +
                           " nodeId=" + searchResult.getNodeId() +
                           " nEntries=" + searchResult.getNEntries());
            }
            throw new DatabaseException(msg.toString(), e);
        }

  if (location.bin == null) {
      return false;
  }
View Full Code Here

                    /*
                     * Shouldn't happen; the only caller of this method
                     * which allows splits is from recovery, which is
                     * single threaded.
                     */
                    throw new DatabaseException(e);
                }
            } else {
                location.bin = (BIN) searchSubTree
                    (duplicateRoot, location.lnKey, SearchType.NORMAL,
                     ln.getNodeId(), null, updateGeneration);
View Full Code Here

            }
            if (t instanceof DatabaseException) {
                /* don't re-wrap a DatabaseException; we may need its type. */
                throw (DatabaseException) t;
            } else {
                throw new DatabaseException(t);
            }
        }
    }
View Full Code Here

                     * Shouldn't happen -- we have the parent BIN in the
                     * of the dup tree latched during this insert, there
                     * should be no possibility of being unable to
                     * insert a new entry into the DIN root of the dup tree.
                     */
                    throw new DatabaseException(e) ;
                }

                /*
                 * Try to insert a new reference object. If successful, we'll
                 * log the LN and update the LSN in the reference.
View Full Code Here

     * duplicates.
     */
    private void validateInsertArgs(boolean allowDuplicates)
        throws DatabaseException {
        if (allowDuplicates && !database.getSortedDuplicates()) {
            throw new DatabaseException
                ("allowDuplicates passed to insert but database doesn't " +
                 "have allow duplicates set.");
        }
    }
View Full Code Here

            parent = (IN) root.getTarget();
        }
        if (parent != null) {
            INList inList = database.getDbEnvironment().getInMemoryINs();
            if (!inList.getINs().contains(parent)) {
                throw new DatabaseException
                    ("IN " + parent.getNodeId() + " missing from INList");
            }
            for (int i = 0;; i += 1) {
                try {
                    Node node = parent.getTarget(i);
                    if (i >= parent.getNEntries()) {
                        if (node != null) {
                            throw new DatabaseException
                                ("IN " + parent.getNodeId() +
                                 " has stray node " + node.getNodeId() +
                                 " at index " + i);
                        }
                        byte[] key = parent.getKey(i);
                        if (key != null) {
                            throw new DatabaseException
                                ("IN " + parent.getNodeId() +
                                 " has stray key " + key +
                                 " at index " + i);
                        }
                    }
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.