Mobios v0.91

mobios.mckoi.store
Class BufferManager

java.lang.Object
  extended by mobios.mckoi.store.BufferManager

public final class BufferManager
extends Object

A centralized manager that manages one or more AbstractBufferedFile implementstions. This object manages memory usage of the children buffers and implements a caching strategy for purging old pages from memory.

Author:
Tobias Downer

Constructor Summary
BufferManager(String paging_implementation, int max_pages, int page_size)
          Constructs the manager.
 
Method Summary
 void addTime(long l)
           
 FileBufferAccessor createBufferedAccessor(RandomAccessFile file, String mode)
          Creates and returns a FileBufferAccess object that is used to access the RandomAccessFile through this buffer manager.
 long getCache_hit_count()
           
 long getCache_miss_count()
           
 void printStatistics()
          Added by Willard, 2005.05.24
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferManager

public BufferManager(String paging_implementation,
                     int max_pages,
                     int page_size)
Constructs the manager.

Method Detail

createBufferedAccessor

public FileBufferAccessor createBufferedAccessor(RandomAccessFile file,
                                                 String mode)
                                          throws IOException
Creates and returns a FileBufferAccess object that is used to access the RandomAccessFile through this buffer manager.

Throws:
IOException

getCache_hit_count

public long getCache_hit_count()
Returns:
Returns the cache_hit_count.

getCache_miss_count

public long getCache_miss_count()
Returns:
Returns the cache_miss_count.

addTime

public void addTime(long l)
Parameters:
l -

printStatistics

public void printStatistics()
Added by Willard, 2005.05.24


Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group