com.siviam.bobup.strategy
Interface IBackupStrategy

All Known Implementing Classes:
TowerOfHanoiBackupStrategy

public interface IBackupStrategy

The backup strategy specifies the number of media available for backup and the strategy for those media. Two popular methods are the Tower of Hanoi and Grandfather-father-son.

Author:
vishnu

Method Summary
 int getMaxNumberOfMedia()
          Provides the number of media that are used for the backup.
 int getMediumNumber(boolean next)
          Obtains media/disk/folder number to be used for the backup according to this strategy.
 int getMediumNumber(java.util.Date epochDate, java.util.Date referenceDate)
          Obtains a medium number at the provided reference date given an "epoch" date i.e.
 long getPeriodicity()
          The medium for the backup will be switched after the current period has expired.
 

Method Detail

getMaxNumberOfMedia

public int getMaxNumberOfMedia()
Provides the number of media that are used for the backup. This could be either physical disks, tapes or merely folders.

Returns:
the number of media.

getMediumNumber

public int getMediumNumber(boolean next)
Obtains media/disk/folder number to be used for the backup according to this strategy.

Parameters:
next - true if a new medium must be selected, false otherwise.
Returns:
the medium number that is currently being used.

getMediumNumber

public int getMediumNumber(java.util.Date epochDate,
                           java.util.Date referenceDate)
Obtains a medium number at the provided reference date given an "epoch" date i.e. the date when the backups were first started for the system.

Parameters:
epochDate -
referenceDate -
Returns:

getPeriodicity

public long getPeriodicity()
The medium for the backup will be switched after the current period has expired. The periodicity is configurable for the strategy.

Returns:
the periodicity in milliseconds.


Copyright © 2001-2006. All Rights Reserved.