Package com.sleepycat.je.utilint

Examples of com.sleepycat.je.utilint.VLSN.compareTo()


       */
      if (vlsnAllocatedBeforeCkpt == null) {
    vlsnAllocatedBeforeCkpt = new VLSN(nextVLSNCounter.get());
      } else {
    VLSN latestAllocated = new VLSN(nextVLSNCounter.get());
    if (latestAllocated.compareTo(vlsnAllocatedBeforeCkpt) < 0) {
        LoggerUtils.info(logger, envImpl,
             "Reducing awaitConsistency VLSN from " +
             vlsnAllocatedBeforeCkpt + " to " +
             latestAllocated);
        vlsnAllocatedBeforeCkpt = latestAllocated;
View Full Code Here


        /* Maintain last VLSN encountered. */
        if (currentEntryHeader.getReplicated()) {
            final VLSN vlsn = currentEntryHeader.getVLSN();
            if (vlsn != null) {
                assert (vlsn.compareTo(lastVLSN) > 0) :
                    "vlsns out of order, last=" + lastVLSN +
                     " current=" + vlsn;
                lastVLSN = vlsn;
            }
        }
View Full Code Here

        /* Take the minimum of SyncCleanerBarrier and GlobalCBVLSN. */
        long syncStart = repImpl.getSyncCleanerBarrier().getMinSyncStart();
        if (syncStart != LogChangeSet.NULL_POSITION) {
            VLSN vlsn = new VLSN(syncStart);
            if (vlsn.compareTo(globalCBVLSN.getCBVLSN()) < 0) {
                return repImpl.getVLSNIndex().getLTEFileNumber(vlsn);
            }
        }

        return globalCBVLSN.getCleanerBarrierFile();
View Full Code Here

            if (newTxnEndVLSN == null) {
                return;
            }

            if (lastTxnEndVLSN == null ||
                newTxnEndVLSN.compareTo(lastTxnEndVLSN) == 1) {
                lastTxnEndVLSN = newTxnEndVLSN;
                repNode.getRepImpl().getLogManager().flush();
            }
        }
    }
View Full Code Here

            if (candidate.isNull()) {
                return;
            }

            if (candidate.compareTo(repNode.getGroupCBVLSN()) < 0) {
                /* Don't let the group CBVLSN regress.*/
                return;
            }

            boolean updated = repNode.repGroupDB.updateLocalCBVLSN(nameIdPair,
View Full Code Here

                 * usual way, the global CBVLSN would be set.
                 */
                return protocol.new EntryNotFound();
            }
        } else {
            if (globalCBVLSN.compareTo(requestMatchpoint) > 0) {
                return protocol.new EntryNotFound();
            }
        }

        /*
 
View Full Code Here

                 * the incoming VLSN >= the waiting VLSN. For example, a feeder
                 * may be awaiting VLSN 100, but the call to put(101) comes in
                 * before the call to put(100).
                 */
                if ((vlsnPutLatch != null) &&
                    vlsn.compareTo(putWaitVLSN) >= 0) {
                    vlsnPutLatch.setLogItem(logItem);
                    vlsnPutLatch.countDown();
                    vlsnPutLatch = null;
                    putWaitVLSN = null;
                }
View Full Code Here

         */
        VLSN persistentLast = tracker.getRange().getLast();
        VLSN recoveryFirst = recoveryTracker.getRange().getFirst();
        if ((!(envImpl.isConverted() && persistentLast.isNull()) ||
             !envImpl.isConverted()) &&
            recoveryFirst.compareTo(persistentLast.getNext()) > 0) {

            throw EnvironmentFailureException.unexpectedState
                (envImpl, "recoveryTracker should overlap or follow on disk " +
                 "last VLSN of " + persistentLast + " recoveryFirst= " +
                 recoveryFirst);
View Full Code Here

            if (firstVLSNSeen.compareTo(range.getFirst()) != 0) {
                out.println("First VLSN in bucket = " + firstVLSNSeen +
                            " and doesn't match range " + range.getFirst());
            }

            if (lastVLSNSeen.compareTo(range.getLast()) != 0) {
                out.println("Last VLSN in bucket = " + lastVLSNSeen +
                            " and doesn't match range " + range.getLast());
            }

        } finally {
View Full Code Here

         * Find the mappings that still belong. Using the example above, we
         * should find that we can delete fileOffset[0] and fileOffset[1] and
         * preserve fileOffset[2]
         */
        for (int i = 0; i < fileOffsets.size(); i++) {
            if ((indexVLSN.compareTo(lastDuplicate) > 0) &&
                (fileOffsets.get(i) != NO_OFFSET)) {
                newFirstIndex = i;
                break;
            }
            indexVLSN = new VLSN(indexVLSN.getSequence() + stride);
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.