InSilicoSpectro::Utils::FileCached - InSilicoSpectro::Utils::FileCached documentation


InSilicoSpectro documentation  | view source Contained in the InSilicoSpectro distribution.

Index


NAME

Top

InSilicoSpectro::Utils::FileCached

SYNOPSIS

Top

DESCRIPTION

Top

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

FUNCTIONS

Top

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

Top

$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

Top

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

Top

SEE ALSO

Top

COPYRIGHT

Top

AUTHORS

Top

Alexandre Masselot, www.genebio.com


InSilicoSpectro documentation  | view source Contained in the InSilicoSpectro distribution.