simpledb.multibuffer
Class BufferNeeds
java.lang.Object
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
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 |
BufferNeeds
public BufferNeeds()
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.