simpledb.multibuffer
Class BufferNeeds

java.lang.Object
  extended by simpledb.multibuffer.BufferNeeds

public class BufferNeeds
extends Object

A class containing static methods, which estimate the optimal number of buffers to allocate for a scan.

Author:
Edward Sciore

Constructor Summary
BufferNeeds()
           
 
Method Summary
static int bestFactor(int size)
          This method considers the various factors of the specified output size (in blocks), and returns the highest factor that is less than the number of available buffers.
static int bestRoot(int size)
          This method considers the various roots of the specified output size (in blocks), and returns the highest root that is less than the number of available buffers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferNeeds

public BufferNeeds()
Method Detail

bestRoot

public static int bestRoot(int size)
This method considers the various roots of the specified output size (in blocks), and returns the highest root that is less than the number of available buffers.

Parameters:
size - the size of the output file
Returns:
the highest number less than the number of available buffers, that is a root of the plan's output size

bestFactor

public static int bestFactor(int size)
This method considers the various factors of the specified output size (in blocks), and returns the highest factor that is less than the number of available buffers.

Parameters:
size - the size of the output file
Returns:
the highest number less than the number of available buffers, that is a factor of the plan's output size


Copyright © 2011. All Rights Reserved.