Examples of DbTxn


Examples of com.sleepycat.db.DbTxn

        int type = Db.DB_BTREE;
        if (isQueue) {
            type = Db.DB_RECNO;
        }
        String databaseName = null;
        DbTxn transaction = createTransaction(environment);
        try {
            db.open(transaction, name, databaseName, type, flags, 0);
            transaction = commitTransaction(transaction);
        }
        finally {
View Full Code Here

Examples of com.sleepycat.db.DbTxn

        }
    }


    public void removeMessage(MessageIdentity identity, MessageAck ack) throws JMSException {
        DbTxn transaction = null;
        String messageID = identity.getMessageID();
        try {
            database.delete(BDbHelper.getTransaction(), createKey(messageID), 0);
        }
        catch (DbException e) {
View Full Code Here

Examples of com.sleepycat.db.DbTxn

        int type = Db.DB_BTREE;
        if (isQueue) {
            type = Db.DB_RECNO;
        }
        String databaseName = null;
        DbTxn transaction = createTransaction(environment);
        try {
            db.open(transaction, name, databaseName, type, flags, 0);
            transaction = commitTransaction(transaction);
        }
        finally {
View Full Code Here

Examples of com.sleepycat.db.DbTxn

        }
    }


    public void removeMessage(MessageAck ack) throws JMSException {
        DbTxn transaction = null;
        String messageID = ack.getMessageID();
        try {
            database.delete(BDbHelper.getTransaction(), createKey(messageID), 0);
        }
        catch (DbException e) {
View Full Code Here

Examples of com.sleepycat.db.DbTxn

        }
    }


    public void removeMessage(MessageIdentity identity, MessageAck ack) throws JMSException {
        DbTxn transaction = null;
        String messageID = identity.getMessageID();
        try {
            database.delete(BDbHelper.getTransaction(), createKey(messageID), 0);
        }
        catch (DbException e) {
View Full Code Here

Examples of com.sleepycat.db.internal.DbTxn

            else
            {
                DatabaseEntry key = new DatabaseEntry(new byte[24]);
                DatabaseEntry data = new DatabaseEntry(null);
                Db blocks = directory.blocks;
                DbTxn txn = directory.txn;
                int flags = directory.flags;

                key.setUserBuffer(24, true);
                data.setPartial(true);
View Full Code Here

Examples of com.sleepycat.db.internal.DbTxn

    protected boolean exists(DbDirectory directory)
        throws IOException
    {
        Db files = directory.files;
        DbTxn txn = directory.txn;
        int flags = directory.flags;

        try {
            if (files.get(txn, key, data, flags) == DbConstants.DB_NOTFOUND)
                return false;
View Full Code Here

Examples of com.sleepycat.db.internal.DbTxn

        throws IOException
    {
        ByteArrayOutputStream buffer = new ByteArrayOutputStream(32);
        DataOutputStream out = new DataOutputStream(buffer);
        Db files = directory.files;
        DbTxn txn = directory.txn;

        out.writeLong(length);
        out.writeLong(timeModified);
        out.write(getKey());
        out.close();
View Full Code Here

Examples of com.sleepycat.db.internal.DbTxn

                byte[] cursorBytes = new byte[ulen];
                DatabaseEntry cursorKey = new DatabaseEntry(cursorBytes);
                DatabaseEntry cursorData = new DatabaseEntry(null);
                Db files = directory.files;
                Db blocks = directory.blocks;
                DbTxn txn = directory.txn;
                int flags = directory.flags;

                System.arraycopy(bytes, 0, cursorBytes, 0, bytes.length);
                cursorKey.setUserBuffer(ulen, true);
                cursorData.setPartial(true);
View Full Code Here

Examples of com.sleepycat.db.internal.DbTxn

        if (newFile.exists(directory))
            newFile.delete(directory);

        try {
            Db files = directory.files;
            DbTxn txn = directory.txn;

            files.del(txn, key, 0);
            setName(name);
            files.put(txn, key, data, 0);
        } catch (DatabaseException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.