Examples of openCursor()


Examples of com.sleepycat.je.Database.openCursor()

                System.arraycopy(bytes, 0, cursorBytes, 0, bytes.length);

                cursorData.setPartial(true);

                cursor = blocks.openCursor(txn, null);

                if (cursor.getSearchKey(cursorKey, cursorData, null) != OperationStatus.NOTFOUND) {
                    cursor.delete();

                    while (cursor.getNextDup(cursorKey, cursorData, null) != OperationStatus.NOTFOUND) {
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

     * using this method.
     */
    db = dc.openDatabase("db", dbConfig);
    secDb = dc.openSecondaryDatabase("secDb", db, secDbConfig);
    System.out.println("blort");
    cursor = db.openCursor(null, null);
    cursor.put(new DatabaseEntry(key.getBytes()),
         new DatabaseEntry(data.getBytes()));
      } finally {
    if (cursor != null) {
        cursor.close();
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

     * Use JEConnection.openDatabase() to obtain a cached Database
     * handle.  Do not call close() on Database handles obtained
     * using this method.
     */
    db = dc.openDatabase("db", dbConfig);
    cursor = db.openCursor(null, null);
    DatabaseEntry data = new DatabaseEntry();
    cursor.getSearchKey(new DatabaseEntry(key.getBytes()),
            data,
            null);
    return new String(data.getData());
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

                System.arraycopy(bytes, 0, cursorBytes, 0, bytes.length);

                cursorData.setPartial(true);

                cursor = blocks.openCursor(txn, null);

                if (cursor.getSearchKey(cursorKey, cursorData, null) != OperationStatus.NOTFOUND) {
                    cursor.delete();
                    advance: while (cursor.getNext(cursorKey, cursorData, null) != OperationStatus.NOTFOUND) {
                        byte[] temp = cursorKey.getData();
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

                }
                txn.commit();
            }
        } else {
            /* retrieve the data */
            Cursor cursor = exampleDb.openCursor(null, null);

            while (cursor.getNext(keyEntry, dataEntry, LockMode.DEFAULT) ==
                   OperationStatus.SUCCESS) {
                System.out.println("key=" +
                                   IntegerBinding.entryToInt(keyEntry) +
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

        Database versionDb = null;
        Cursor cursor = null;
        try
        {
            versionDb = _environment.openDatabase(null, Upgrader.VERSION_DB_NAME, dbConfig);
            cursor = versionDb.openCursor(null, null);
            DatabaseEntry key = new DatabaseEntry();
            DatabaseEntry value = new DatabaseEntry();
            while (cursor.getNext(key, value, null) == OperationStatus.SUCCESS)
            {
                int version = IntegerBinding.entryToInt(key);
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

        Database versionDb = null;
        Cursor cursor = null;
        try
        {
            versionDb = environment.openDatabase(null, Upgrader.VERSION_DB_NAME, dbConfig);
            cursor = versionDb.openCursor(null, null);
            DatabaseEntry key = new DatabaseEntry();
            DatabaseEntry value = new DatabaseEntry();
            while (cursor.getNext(key, value, null) == OperationStatus.SUCCESS)
            {
                int version = IntegerBinding.entryToInt(key);
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

        try {
            if (verbose) {
                System.out.println("Verifying VLSN index");
            }

            cursor = db.openCursor(null, CursorConfig.READ_COMMITTED);

            DatabaseEntry key = new DatabaseEntry();
            DatabaseEntry data = new DatabaseEntry();

            /*
 
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

    private static void preload(Environment env, String dbName)
        throws Exception {

        System.out.println("Preload starting");
        Database db = env.openDatabase(null, dbName, null);
        Cursor cursor = db.openCursor(null, null);
        try {
            DatabaseEntry key = new DatabaseEntry();
            DatabaseEntry data = new DatabaseEntry();
            int count = 0;
            while (cursor.getNext(key, data, LockMode.DEFAULT) ==
View Full Code Here

Examples of com.sleepycat.je.Database.openCursor()

        }
        dupSort = db.getConfig().getSortedDuplicates();

        printHeader(outputFile, dupSort, formatUsingPrintable);

        Cursor cursor = db.openCursor(null, null);
        while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) ==
               OperationStatus.SUCCESS) {
            dumpOne(outputFile, foundKey.getData(), formatUsingPrintable);
            dumpOne(outputFile, foundData.getData(), formatUsingPrintable);
        }
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.