|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.buffer.BasicBufferMgr
class BasicBufferMgr
Manages the pinning and unpinning of buffers to blocks.
Constructor Summary | |
---|---|
BasicBufferMgr(int numbuffs)
Creates a buffer manager having the specified number of buffer slots. |
Method Summary | |
---|---|
(package private) int |
available()
Returns the number of available (i.e. |
(package private) void |
flushAll(int txnum)
Flushes the dirty buffers modified by the specified transaction. |
(package private) Buffer |
pin(Block blk)
Pins a buffer to the specified block. |
(package private) Buffer |
pinNew(java.lang.String filename,
PageFormatter fmtr)
Allocates a new block in the specified file, and pins a buffer to it. |
(package private) void |
unpin(Buffer buff)
Unpins the specified buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
BasicBufferMgr(int numbuffs)
FileMgr
and
LogMgr
objects
that it gets from the class
SimpleDB
.
Those objects are created during system initialization.
Thus this constructor cannot be called until
SimpleDB.initFileAndLogMgr(String)
or
is called first.
numbuffs
- the number of buffer slots to allocateMethod Detail |
---|
void flushAll(int txnum)
txnum
- the transaction's id numberBuffer pin(Block blk)
blk
- a reference to a disk block
Buffer pinNew(java.lang.String filename, PageFormatter fmtr)
filename
- the name of the filefmtr
- a pageformatter object, used to format the new block
void unpin(Buffer buff)
buff
- the buffer to be unpinnedint available()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |