GigaSpaces XAP 7.0 API

com.gigaspaces.logger
Class DeleteBackupPolicy

java.lang.Object
  extended by com.gigaspaces.logger.DeleteBackupPolicy
All Implemented Interfaces:
BackupPolicy

public class DeleteBackupPolicy
extends Object
implements BackupPolicy

A backup policy that deletes any file which is older than the specified period, but keeps at least as many of the specified backup files.

By default, a file is kept for a 30 day period. After 30 days, the file is deleted; Unless if there are less than 10 backup files available.

These properties can be configured either by modifying the logging configuration file or by use of a system property override, as specified by:

-Dcom.gigaspaces.logger.DeleteBackupPolicy.[property-name]=[property-value]
For example:
-Dcom.gigaspaces.logger.DeleteBackupPolicy.period=60

Note: The RollingFileHandler is by default configured to use the NullBackupPolicy.

Since:
7.0
Author:
Moran Avigdor

Constructor Summary
DeleteBackupPolicy()
          Constructs a delete-backup policy specifying the period (in days) to keep a file before deletion, and the number of files to keep as backup.
 
Method Summary
 void track(File file)
          Track a newly created file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteBackupPolicy

public DeleteBackupPolicy()
Constructs a delete-backup policy specifying the period (in days) to keep a file before deletion, and the number of files to keep as backup.

Method Detail

track

public void track(File file)
Description copied from interface: BackupPolicy
Track a newly created file. A file is either created upon rollover or at initialization time. Implementation can keep track of files and decide whether to trigger the backup policy.

Specified by:
track in interface BackupPolicy
Parameters:
file - A newly created file.

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.