com.sleepycat.je.dbi
Class INList

java.lang.Object
  extended by com.sleepycat.je.dbi.INList
All Implemented Interfaces:
Iterable<IN>

public class INList
extends Object
implements Iterable<IN>

The INList is a list of in-memory INs for a given environment.


Constructor Summary
INList(EnvironmentImpl envImpl)
           
INList(INList orig, EnvironmentImpl envImpl)
          Used only by tree verifier when validating INList.
 
Method Summary
 void add(IN in)
          An IN has just come into memory, add it to the list.
 void clear()
          Clear the entire list at shutdown and release its portion of the memory budget.
 boolean contains(IN in)
           
 void dump()
           
 void enable()
          Enable the INList during recovery.
 int getSize()
           
 Iterator<IN> iterator()
          Return an iterator over the main 'ins' set.
 StatGroup loadStats()
          All stats from the INList are instantaneous -- never need to be cleared.
 void memRecalcBegin()
          We are starting the iteration of the INList.
 void memRecalcEnd(boolean completed)
          The reset operation is over.
 void memRecalcIterate(IN in)
          An IN was encountered during the iteration through the entire INList.
 void memRecalcUpdate(IN in, long delta)
          The size of an IN is changing.
 void remove(IN in)
          An IN is being evicted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

INList

INList(EnvironmentImpl envImpl)

INList

public INList(INList orig,
              EnvironmentImpl envImpl)
Used only by tree verifier when validating INList.

Method Detail

loadStats

public StatGroup loadStats()
All stats from the INList are instantaneous -- never need to be cleared.


getSize

public int getSize()

contains

public boolean contains(IN in)

enable

public void enable()
Enable the INList during recovery.


add

public void add(IN in)
An IN has just come into memory, add it to the list.


remove

public void remove(IN in)
An IN is being evicted.


iterator

public Iterator<IN> iterator()
Return an iterator over the main 'ins' set. Returned iterator may or may not show elements added or removed after the iterator is created.

Specified by:
iterator in interface Iterable<IN>
Returns:
an iterator over the main 'ins' set.

clear

public void clear()
Clear the entire list at shutdown and release its portion of the memory budget.


dump

public void dump()

memRecalcBegin

public void memRecalcBegin()
We are starting the iteration of the INList. Flip the INList toggle and set the total amount to zero. After calling this method, memRecalcEnd must be called in a finally block. If it is not called, internal state will be invalid.


memRecalcIterate

public void memRecalcIterate(IN in)
An IN was encountered during the iteration through the entire INList. Add its size to the recalc total if we have not already processed it, and mark it as processed. If it was already processed, memRecalcAdd must have been called for the IN when it was added to the INList during the iteration.


memRecalcUpdate

public void memRecalcUpdate(IN in,
                            long delta)
The size of an IN is changing. Add the delta to the recalc total if it have already processed the IN. If we have not yet processed it, its total size will be added by memRecalcIterate.


memRecalcEnd

public void memRecalcEnd(boolean completed)
The reset operation is over. Only update the tree budget if the iteration was completed and the state was consistent prior to this reset operation.



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