org.exist.storage.store
Class DOMFile.ClockPageBuffer

java.lang.Object
  extended byorg.exist.storage.store.DOMFile.ClockPageBuffer
Enclosing class:
DOMFile

protected class DOMFile.ClockPageBuffer
extends java.lang.Object

Cache for data pages. Pages are put on top of a stack. If the stack size exceeds blockBuffers, the last page in the stack will be removed and saved to disk. When a page is removed, it's dirty flag is check to determine if the page needs to be saved. If the page is dirty, the page is saved.

Author:
Wolfgang Meier

Field Summary
protected  int blockBuffers
           
protected  int hits
           
protected  it.unimi.dsi.fastutil.Long2ObjectLinkedOpenHashMap map
           
protected  int misses
           
 
Constructor Summary
DOMFile.ClockPageBuffer()
          Constructor for the PageBuffer object
DOMFile.ClockPageBuffer(int blockBuffers)
          Constructor for the PageBuffer object
 
Method Summary
 void add(DOMFile.DOMPage page)
           
 void add(DOMFile.DOMPage page, int initialRefCount)
          Description of the Method
 void clear()
           
 void flush()
          Description of the Method
 DOMFile.DOMPage get(long pnum)
          Description of the Method
 DOMFile.DOMPage get(org.dbxml.core.filer.Paged.Page page)
          Description of the Method
 void printStatistics()
           
 void remove(DOMFile.DOMPage page)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

blockBuffers

protected int blockBuffers

hits

protected int hits

map

protected it.unimi.dsi.fastutil.Long2ObjectLinkedOpenHashMap map

misses

protected int misses
Constructor Detail

DOMFile.ClockPageBuffer

public DOMFile.ClockPageBuffer(int blockBuffers)
Constructor for the PageBuffer object

Parameters:
blockBuffers - Description of the Parameter

DOMFile.ClockPageBuffer

public DOMFile.ClockPageBuffer()
Constructor for the PageBuffer object

Method Detail

add

public void add(DOMFile.DOMPage page)

add

public void add(DOMFile.DOMPage page,
                int initialRefCount)
Description of the Method

Parameters:
page - Description of the Parameter

flush

public void flush()
Description of the Method


clear

public void clear()

get

public DOMFile.DOMPage get(org.dbxml.core.filer.Paged.Page page)
Description of the Method

Parameters:
page - Description of the Parameter
Returns:
Description of the Return Value

get

public DOMFile.DOMPage get(long pnum)
Description of the Method

Parameters:
pnum - Description of the Parameter
Returns:
Description of the Return Value

remove

public void remove(DOMFile.DOMPage page)
Description of the Method

Parameters:
page - Description of the Parameter

printStatistics

public void printStatistics()


Copyright (C) Wolfgang Meier. All rights reserved.