org.deegree_impl.io.shpapi
Class DBaseIndex.Cache

java.lang.Object
  extended byorg.deegree_impl.io.shpapi.DBaseIndex.Cache
Enclosing class:
DBaseIndex

public class DBaseIndex.Cache
extends java.lang.Object

Inner class for the cache. The cache remembers recently used pages.


Nested Class Summary
(package private)  class DBaseIndex.Cache.Item
          Inner class for the cache items
 
Field Summary
private  java.util.LinkedList cacheItems
           
private  java.util.Hashtable pages
           
 
Constructor Summary
DBaseIndex.Cache()
          Create a new cache
 
Method Summary
 void flush()
          Flush the cache (eg. store modified pages)
 DBaseIndex.Page get(int number)
          Get a page form the cache
 void insert(int number, DBaseIndex.Page p)
          Insert a new item into the cache
(package private)  void removeItem()
          Remove an item from the cache (this method searches for the last used item)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pages

private java.util.Hashtable pages

cacheItems

private java.util.LinkedList cacheItems
Constructor Detail

DBaseIndex.Cache

public DBaseIndex.Cache()
Create a new cache

Method Detail

removeItem

void removeItem()
          throws java.io.IOException
Remove an item from the cache (this method searches for the last used item)

Throws:
java.io.IOException

insert

public void insert(int number,
                   DBaseIndex.Page p)
            throws java.io.IOException
Insert a new item into the cache

Throws:
java.io.IOException

get

public DBaseIndex.Page get(int number)
Get a page form the cache


flush

public void flush()
Flush the cache (eg. store modified pages)