The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

InSilicoSpectro::Utils::FileCached

SYNOPSIS

DESCRIPTION

Virtual class. for caching into files object and stored them into a LIFO queue

FUNCTIONS

queueSize(nbobj=>int)

Set the queue size in muber of object;

queueOverflow()

return true/false if the queue is overflowed (then the oldest one(s) must be ejected)

verbose([boolean])

get/set verbose mode

FC_tempdir()

get the temporary file (or create one on the first call)

queueDump()

dump on STDOUT the list of managed object in memory (not the persistent ones)

dump_all()

List all the object registered and if they are in file or memory. Report looks like

METHODS

$obj->FC_persistent([boolean]);

Get/set if the object is to be persistent (i.e. to be managed by the queue). Set persitency at new time

$obj->FC_save();

Serialize and save the object into a file.

$obj->FC_load();

Load object from the file, push it on the first position; remove file;

$obj->FC_file();

Get the file for the object (create on in the tempdir is none was defined);

$obj->FC_key();

returns the unique incremented key

$obj->FC_eject();

Get the object out from the queue, save it on the disk;

Empty the object but the FileCached attributes

$ojb->FC_refresh();

Push the object on the first position of the queue

$obj->FC_getme();

Returns myself + refresh

VARIABLES

REMOVE_TEMP_FILES=bool

set to true (default) to remove temporary files at the process end

QUEUE_MAX_LEN=int

Set the size for the queue of memory resident object (to be set before starting to instanciate objects)

EXAMPLES

SEE ALSO

COPYRIGHT

Copyright (C) 2004-2006 Geneva Bioinformatics www.genebio.com

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AUTHORS

Alexandre Masselot, www.genebio.com