VolD 0.1

de.zib.vold.volatilelogic.TimeSlice Class Reference

A factor ring implementation. More...

List of all members.

Public Member Functions

 TimeSlice (long timeSliceSize, long numberOfSlices) throws IllegalArgumentException
 Construct a certain factor ring.
 TimeSlice ()
 Construct a trivial TimeSlice.
void setTimeSliceSize (long timeSliceSize)
 Set the size of one slice in milliseconds.
void setNumberOfSlices (long numberOfSlices)
 Set the number of slices.
long getTimeSliceSize ()
 Get the size of one slice in milliseconds.
long getNumberOfSlices ()
 Get the number of slices.
long getActualSlice ()
 Returns the slice number for the actual time.

Private Attributes

long timeSliceSize
long numberOfSlices

Detailed Description

A factor ring implementation.

This implementation of a factor ring is called TimeSlice, since it provides a method returning an element of the actual factor ring which is associated with the current time.

The purpose of this class targets the Reaper, which deletes too old keys by requesting all keys in a certain time slice and thus is just filtering a small set of keys at one time instead of loading the database into the memory completely.

See also:
SlicedDirectory
Reaper
Author:
Jörg Bachmann (bachmann@zib.de)

Definition at line 23 of file TimeSlice.java.


Constructor & Destructor Documentation

de.zib.vold.volatilelogic.TimeSlice.TimeSlice ( long  timeSliceSize,
long  numberOfSlices 
) throws IllegalArgumentException

Construct a certain factor ring.

Parameters:
tileSliceSizeThe size of one time slice in milliseconds.
numberOfSlicesThe number of elements in the factor ring.

Definition at line 34 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.numberOfSlices, de.zib.vold.volatilelogic.TimeSlice.setNumberOfSlices(), de.zib.vold.volatilelogic.TimeSlice.setTimeSliceSize(), and de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.

Here is the call graph for this function:

de.zib.vold.volatilelogic.TimeSlice.TimeSlice ( )

Construct a trivial TimeSlice.

This constructor intializes the trivial factor ring with one element.

Definition at line 46 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.numberOfSlices, and de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.


Member Function Documentation

long de.zib.vold.volatilelogic.TimeSlice.getActualSlice ( )

Returns the slice number for the actual time.

Note:
Its return value may change each time, the method is called. Furthermore, the value may no more be valid after the method returned.
Returns:
The current time slice.

Definition at line 130 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.getNumberOfSlices(), de.zib.vold.volatilelogic.TimeSlice.getTimeSliceSize(), de.zib.vold.volatilelogic.TimeSlice.numberOfSlices, and de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.

Referenced by de.zib.vold.volatilelogic.VolatileDirectoryImpl.getActualSlice(), de.zib.vold.volatilelogic.VolatileDirectoryImpl.insert(), and de.zib.vold.volatilelogic.VolatileDirectoryImpl.refresh().

Here is the call graph for this function:

Here is the caller graph for this function:

long de.zib.vold.volatilelogic.TimeSlice.getNumberOfSlices ( )

Get the number of slices.

Each slice number will be returned modulo this number.

Returns:
The factor ring identifier.

Definition at line 108 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.numberOfSlices, and de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.

Referenced by de.zib.vold.volatilelogic.TimeSlice.getActualSlice(), and de.zib.vold.volatilelogic.VolatileDirectoryImpl.getNumberOfSlices().

Here is the caller graph for this function:

long de.zib.vold.volatilelogic.TimeSlice.getTimeSliceSize ( )

Get the size of one slice in milliseconds.

Returns:
The time slice size in milliseconds.

Definition at line 88 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.numberOfSlices, and de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.

Referenced by de.zib.vold.volatilelogic.TimeSlice.getActualSlice(), and de.zib.vold.volatilelogic.VolatileDirectoryImpl.getTimeSliceSize().

Here is the caller graph for this function:

void de.zib.vold.volatilelogic.TimeSlice.setNumberOfSlices ( long  numberOfSlices)

Set the number of slices.

Each slice number will be returned modulo this number.

Parameters:
numberOfSlicesThe identifier for the factor ring.

Definition at line 74 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.numberOfSlices.

Referenced by de.zib.vold.volatilelogic.TimeSlice.TimeSlice().

Here is the caller graph for this function:

void de.zib.vold.volatilelogic.TimeSlice.setTimeSliceSize ( long  timeSliceSize)

Set the size of one slice in milliseconds.

Parameters:
timeSliceSizeThe time slice size in milliseconds.

Definition at line 57 of file TimeSlice.java.

References de.zib.vold.volatilelogic.TimeSlice.timeSliceSize.

Referenced by de.zib.vold.volatilelogic.TimeSlice.TimeSlice().

Here is the caller graph for this function:


Member Data Documentation


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