Examples of updateMiscMemoryUsage()


Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

         * Add the overhead of this method to the budget.  The log size of the
         * offsets happens to be the same as the memory overhead.
         */
        MemoryBudget budget = env.getMemoryBudget();
        int adjustMem = readBufferSize + obsoleteOffsets.getLogSize();
        budget.updateMiscMemoryUsage(adjustMem);

        try {
            /* Create the file reader. */
            CleanerFileReader reader = new CleanerFileReader
                (env, readBufferSize, DbLsn.NULL_LSN, fileNum);
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

            nEntriesReadThisRun = reader.getNumRead();
            nRepeatIteratorReadsThisRun = reader.getNRepeatIteratorReads();

        } finally {
            /* Subtract the overhead of this method to the budget. */
            budget.updateMiscMemoryUsage(0 - adjustMem);

            /* Allow flushing of TFS when cleaning is complete. */
            if (tfs != null) {
                tfs.setAllowFlush(true);
            }
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

    public synchronized void clearCache() {

        int memorySize = fileSummaryMap.size() *
            MemoryBudget.UTILIZATION_PROFILE_ENTRY;
        MemoryBudget mb = env.getMemoryBudget();
        mb.updateMiscMemoryUsage(0 - memorySize);

        fileSummaryMap = new TreeMap();
        cachePopulated = false;
    }

View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

        assert opened;

        /* Remove from the cache. */
        if (fileSummaryMap.remove(fileNum) != null) {
            MemoryBudget mb = env.getMemoryBudget();
            mb.updateMiscMemoryUsage
                (0 - MemoryBudget.UTILIZATION_PROFILE_ENTRY);
        }

        /* Delete from the summary db. */
        deleteFileSummary(fileNum);
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

        /* Cache the updated summary object.  */
        summary = ln.getBaseSummary();
        if (fileSummaryMap.put(fileNumLong, summary) == null) {
            MemoryBudget mb = env.getMemoryBudget();
            mb.updateMiscMemoryUsage
                (MemoryBudget.UTILIZATION_PROFILE_ENTRY);
        }

        return ln.getObsoleteOffsets();
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

            }

            int newMemorySize = fileSummaryMap.size() *
                MemoryBudget.UTILIZATION_PROFILE_ENTRY;
            MemoryBudget mb = env.getMemoryBudget();
            mb.updateMiscMemoryUsage(newMemorySize - oldMemorySize);
        }

        cachePopulated = true;
        return true;
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

                int size = nodeSet.size() *
                    MemoryBudget.CHECKPOINT_REFERENCE_SIZE;
    totalSize += size;
                dirtyMapMemSize += size;
            }
      mb.updateMiscMemoryUsage(totalSize);

            /* Flush IN nodes. */
            boolean allowDeltas = !config.getMinimizeRecoveryTime();
            flushDirtyNodes(dirtyMap, flushAll, allowDeltas,
                            flushExtraLevel, checkpointStart);
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

        } catch (DatabaseException e) {
            Tracer.trace(envImpl, "Checkpointer", "doCheckpoint",
                         "checkpointId=" + checkpointId, e);
            throw e;
        } finally {
            mb.updateMiscMemoryUsage(0 - dirtyMapMemSize);
            if (!traced) {
                trace(envImpl, invokingSource, success);
            }
        }
    }
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

         */
        int adjustMem = (2 * readBufferSize) +
                        obsoleteOffsets.getLogSize() +
                        lookAheadCacheSize;
        MemoryBudget budget = env.getMemoryBudget();
        budget.updateMiscMemoryUsage(adjustMem);

        /* Evict after updating the budget. */
        if (Cleaner.DO_CRITICAL_EVICTION) {
            env.getEvictor().doCriticalEviction();
        }
View Full Code Here

Examples of com.sleepycat.je.dbi.MemoryBudget.updateMiscMemoryUsage()

            nEntriesReadThisRun = reader.getNumRead();
            nRepeatIteratorReadsThisRun = reader.getNRepeatIteratorReads();

        } finally {
            /* Subtract the overhead of this method from the budget. */
            budget.updateMiscMemoryUsage(0 - adjustMem);

            /* Allow flushing of TFS when cleaning is complete. */
            if (tfs != null) {
                tfs.setAllowFlush(true);
            }
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.