com.sleepycat.je.evictor
Class Arbiter

java.lang.Object
  extended by com.sleepycat.je.evictor.Arbiter

 class Arbiter
extends Object

The Arbiter determines whether eviction should occur, by consulting the memory budget.


Constructor Summary
Arbiter(EnvironmentImpl envImpl)
           
 
Method Summary
(package private)  long getEvictionPledge()
          Return non zero number of bytes if eviction should happen.
 boolean isCacheFull()
          Returns true if the JE cache level is above the point where it is likely that the cache has filled, and is staying full.
(package private)  boolean isOverBudget()
          Return true if the memory budget is overspent.
 StatGroup loadStats(StatsConfig config)
           
(package private)  boolean needCriticalEviction()
          Do a check on whether synchronous eviction is needed.
(package private)  void setRunnableHook(TestHook<Boolean> hook)
           
(package private)  boolean stillNeedsEviction()
          Do a check on whether the cache should still be subject to eviction.
 boolean wasCacheEverFull()
          Returns whether eviction has ever occurred, i.e., whether the cache has ever filled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arbiter

Arbiter(EnvironmentImpl envImpl)
Method Detail

loadStats

public StatGroup loadStats(StatsConfig config)

isOverBudget

boolean isOverBudget()
Return true if the memory budget is overspent.


needCriticalEviction

boolean needCriticalEviction()
Do a check on whether synchronous eviction is needed. Note that this method is intentionally not synchronized in order to minimize overhead when checking for critical eviction. This method is called from application threads for every cursor operation.


stillNeedsEviction

boolean stillNeedsEviction()
Do a check on whether the cache should still be subject to eviction. Note that this method is intentionally not synchronized in order to minimize overhead, because it's checked on every iteration of the evict batch loop.


isCacheFull

public boolean isCacheFull()
Returns true if the JE cache level is above the point where it is likely that the cache has filled, and is staying full. This is not guaranteed, since the level does not stay at a constant value. But it is a good enough indication to drive activities such as cache mode determination. This method errs on the side of returning true sooner than the point where the cache is actually full, as described below.


wasCacheEverFull

public boolean wasCacheEverFull()
Returns whether eviction has ever occurred, i.e., whether the cache has ever filled.


getEvictionPledge

long getEvictionPledge()
Return non zero number of bytes if eviction should happen. Caps the number of bytes a single thread will try to evict.


setRunnableHook

void setRunnableHook(TestHook<Boolean> hook)


Copyright (c) 2004-2012 Oracle. All rights reserved.