Package com.sleepycat.je

Examples of com.sleepycat.je.DatabaseException


                                      DatabaseEntry data,
                                      LockMode lockMode)
        throws DatabaseException {

        if (!initialized) {
            throw new DatabaseException("Cursor not initialized");
        }
        if (secCursor != null && pKey != null) {
            return secCursor.getCurrent(key, pKey, data, lockMode);
        } else {
            return cursor.getCurrent(key, data, lockMode);
View Full Code Here


     */
    public Txn txnBegin(Transaction parent, TransactionConfig txnConfig)
        throws DatabaseException {

        if (parent != null) {
            throw new DatabaseException
    ("Nested transactions are not supported yet.");
        }
       
        return new Txn(env, txnConfig);
    }
View Full Code Here

     */
    void unRegisterXATxn(Xid xid, boolean isCommit)
        throws DatabaseException {

  if (allXATxns.remove(xid) == null) {
      throw new DatabaseException
    ("XA Transaction " + xid +
     " can not be unregistered.");
  }
  env.getMemoryBudget().updateMiscMemoryUsage
      (0 - MemoryBudget.HASHMAP_ENTRY_OVERHEAD);
View Full Code Here

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

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

        throws DatabaseException {

        assert assertCursorState(false) : dumpToString(true);

        if (!database.getSortedDuplicates()) {
            throw new DatabaseException
                ("putNoDupData() called, but database is not configured " +
                 "for duplicate data.");
        }
        return putLN(Key.makeKey(key), new LN(data), true);
    }
View Full Code Here

                                           LockGrantType.NEW, mb);
                    addOwner(clonedLockInfo, mb);
                }
                return oldOwner;
            } catch (CloneNotSupportedException e) {
                throw new DatabaseException(e);
            }
        } else {
            return null;
        }
    }
View Full Code Here

         (userComparisonFcn.compare
                                  (foundDataBytes, newData) == 0));
    }
    if (!keysEqual) {
        revertLock(ln, lockResult);
        throw new DatabaseException
      ("Can't replace a duplicate with different data.");
    }
      }
      if (foundData != null) {
    setDbt(foundData, foundDataBytes);
View Full Code Here

     */
    private void verifyCursor(BIN bin)
        throws DatabaseException {

        if (!bin.getCursorSet().contains(this)) {
            throw new DatabaseException("BIN cursorSet is inconsistent.");
        }
    }
View Full Code Here

            }          

            return;
        } else if (status == CURSOR_NOT_INITIALIZED) {
            if (mustBeInitialized) {
                throw new DatabaseException
                    ("Cursor Not Initialized.");
            }
        } else if (status == CURSOR_CLOSED) {
            throw new DatabaseException
                ("Cursor has been closed.");
        } else {
            throw new DatabaseException
                ("Unknown cursor status: " + status);
        }
    }
View Full Code Here

     */
    protected void checkState(boolean ignoreCalledByAbort)
        throws DatabaseException {

        if (thread != Thread.currentThread()) {
            throw new DatabaseException("A per-thread transaction was" +
                                        " created in " + thread +
                                        " but used in " +
                                        Thread.currentThread());
        }
    }
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.