Examples of DatabaseEntry


Examples of com.sleepycat.je.DatabaseEntry

         * Fetches the next entry from the DB, for the partition
         *
         * @return true if some new data was fetched, false if end of data
         */
        private boolean makeMore() {
            DatabaseEntry keyEntry = new DatabaseEntry();
            DatabaseEntry valueEntry = new DatabaseEntry();
            OperationStatus status;
            try {
                if(!positioned) {
                    positioned = true;
                    keyEntry.setData(StoreBinaryFormat.makePartitionKey(partition));
                    status = cursor.getSearchKeyRange(keyEntry,
                                                      valueEntry,
                                                      LockMode.READ_UNCOMMITTED);
                } else {
                    status = cursor.getNext(keyEntry, valueEntry, LockMode.READ_UNCOMMITTED);
                }

                if(OperationStatus.NOTFOUND == status) {
                    // we have reached the end of the cursor
                    return false;
                }

                // check if we are still in the same partition we need
                if(StoreBinaryFormat.extractPartition(keyEntry.getData()) != partition)
                    return false;

                ByteArray key = new ByteArray(StoreBinaryFormat.extractKey(keyEntry.getData()));
                for(Versioned<byte[]> val: StoreBinaryFormat.fromByteArray(valueEntry.getData()))
                    this.cache.add(Pair.create(key, val));
                return true;
            } catch(DatabaseException e) {
                bdbEngine.bdbEnvironmentStats.reportException(e);
                logger.error(e);
View Full Code Here

Examples of org.dbwiki.data.index.DatabaseEntry

    // may be unnecessary
    assert(iterator != null);
   
    body.add("<ul CLASS=\"" + CSS.CSSIndexContent + "\">");
   
    DatabaseEntry entry = null;
    while ((entry = iterator.next()) != null) {
      body.add("<li>" + _request.wri().databaseIdentifier().getLink(entry, versionParameter) + "</li>");
    }
   
    body.add("</ul>");
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.