VolD 0.1

de.zib.vold.frontend.Reaper Class Reference

GarbageCollector for VolD. More...

Collaboration diagram for de.zib.vold.frontend.Reaper:

List of all members.

Classes

class  ReaperWorker
 The Worker class for the reaper. More...

Public Member Functions

 Reaper (SlicedDirectory directory, long TTL)
 Construct an initialized Reaper.
 Reaper ()
 Construct an uninitialized Reaper.
void setTTL (long ttl)
 Set the time a key may live.
void setSlicedDirectory (SlicedDirectory slicedDirectory)
 Set the directory the Reaper should work on.
void stop_service ()
 Stop the thread running in the background.
void start ()
 Start the Reaper in background.
void run ()
 Start the reaper in foreground.
void reap ()
 Work until the run flag is set to false.

Protected Member Functions

void checkState ()
 Internal method which acts as part of the guard of all public methods.

Protected Attributes

final Logger log = LoggerFactory.getLogger( this.getClass() )

Private Attributes

boolean run
long ttl
SlicedDirectory directory

Detailed Description

GarbageCollector for VolD.

The Reaper deletes keys which are older than a certain time to live (TTL). The TTL is a soft limit. Hence, a key may exist longer than the TTL but never twice as much.

Definition at line 24 of file Reaper.java.


Constructor & Destructor Documentation

de.zib.vold.frontend.Reaper.Reaper ( SlicedDirectory  directory,
long  TTL 
)

Construct an initialized Reaper.

Parameters:
directoryThe directory to collect the garbage in.
TTLThe age a key is allowed to reach.

Definition at line 40 of file Reaper.java.

References de.zib.vold.frontend.Reaper.directory, de.zib.vold.frontend.Reaper.run(), and de.zib.vold.frontend.Reaper.ttl.

Here is the call graph for this function:

de.zib.vold.frontend.Reaper.Reaper ( )

Construct an uninitialized Reaper.

Definition at line 59 of file Reaper.java.

References de.zib.vold.frontend.Reaper.directory, de.zib.vold.frontend.Reaper.run(), and de.zib.vold.frontend.Reaper.ttl.

Here is the call graph for this function:


Member Function Documentation

void de.zib.vold.frontend.Reaper.checkState ( ) [protected]

Internal method which acts as part of the guard of all public methods.

Definition at line 69 of file Reaper.java.

References de.zib.vold.frontend.Reaper.directory, and de.zib.vold.frontend.Reaper.ttl.

Referenced by de.zib.vold.frontend.Reaper.reap(), de.zib.vold.frontend.Reaper.run(), and de.zib.vold.frontend.Reaper.stop_service().

Here is the caller graph for this function:

void de.zib.vold.frontend.Reaper.reap ( )

Start the reaper in foreground.

Definition at line 142 of file Reaper.java.

References de.zib.vold.frontend.Reaper.checkState(), and de.zib.vold.frontend.Reaper.reap().

Referenced by de.zib.vold.frontend.Reaper.reap(), de.zib.vold.frontend.Reaper.Reaper(), and de.zib.vold.frontend.Reaper.stop_service().

Here is the call graph for this function:

Here is the caller graph for this function:

void de.zib.vold.frontend.Reaper.setSlicedDirectory ( SlicedDirectory  slicedDirectory)

Set the directory the Reaper should work on.

Definition at line 95 of file Reaper.java.

References de.zib.vold.frontend.Reaper.directory, and de.zib.vold.frontend.Reaper.log.

void de.zib.vold.frontend.Reaper.setTTL ( long  ttl)

Set the time a key may live.

Parameters:
ttlThe age a key may reach.

Definition at line 82 of file Reaper.java.

References de.zib.vold.frontend.Reaper.ttl.

void de.zib.vold.frontend.Reaper.start ( )

Start the Reaper in background.

Definition at line 134 of file Reaper.java.

void de.zib.vold.frontend.Reaper.stop_service ( )

Stop the thread running in the background.

Definition at line 109 of file Reaper.java.

References de.zib.vold.frontend.Reaper.checkState(), de.zib.vold.frontend.Reaper.log, and de.zib.vold.frontend.Reaper.run().

Here is the call graph for this function:


Member Data Documentation

Definition at line 26 of file Reaper.java.


The documentation for this class was generated from the following file: