|
NAMEGenezzo::BufCa::BCFile.pm - A simple in-memory buffer cache for multiple files for a single process, without locking. SYNOPSISuse Genezzo::BufCa::BCFile; # get a buffer cache my $bc = Genezzo::BufCa::BCFile->new(blocksize => 10, numblocks => 5); # register a file my $fileno = Genezzo::BufCa::BCFile->FileReg(FileName => 'file.dat'); # get back some block $bceref = $bc->ReadBlock(filenum => $fileno, blocknum => $blocknum); $bce = $$bceref; DESCRIPTIONThe file buffer cache is a simple module designed to form the basis of a more complicated multi-process buffer cache with locking. The buffer cache contains a number of Buffer Cache Elements (BCEs), a special wrapper class for simple byte buffers (blocks). See L<Genezzo::BufCa::BufCa>. Note that this module does not perform space management or allocation within the files -- it only reads and writes the blocks. The caller is responsible for managing the contents of the file. FUNCTIONS
EXPORTNone by default. LIMITATIONSCurrently requires 2 blocks per open file.TODO
AUTHORJeffrey I. Cohen, jcohen@genezzo.com SEE ALSOperl(1).Copyright (c) 2003-2006 Jeffrey I Cohen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Address bug reports and comments to: jcohen@genezzo.com For more information, please visit the Genezzo homepage at <http://www.genezzo.com>
Visit the GSP FreeBSD Man Page Interface. |