KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > SnapShotStorageMonitor


1 /*
2  * MaxBackupMonitor.java
3  *
4  * Created on December 21, 2003, 8:29 PM
5  */

6
7 package com.sun.enterprise.config.backup;
8
9 import java.io.IOException JavaDoc;
10 import java.io.File JavaDoc;
11 import java.util.Arrays JavaDoc;
12 import java.util.ArrayList JavaDoc;
13 import java.util.List JavaDoc;
14 import java.io.FilenameFilter JavaDoc;
15 import com.sun.enterprise.config.backup.utils.LoggerHelper;
16 import com.sun.enterprise.config.backup.pluggable.EnvironmentFactory;
17 import com.sun.enterprise.config.backup.pluggable.BackupEnvironment;
18 import com.sun.enterprise.config.backup.utils.FactoryHelper;
19
20
21 /**
22  * Anything extraneous in the monitored directory will
23  * not be touched
24  * @author sridatta
25  */

26 public class SnapShotStorageMonitor extends StorageMonitor {
27     
28     /** Creates a new instance of MaxBackupMonitor */
29     public SnapShotStorageMonitor() {
30     }
31     
32     protected int getMaxBackups() {
33         return getEnv().getMaxSnapShots();
34     }
35
36     
37     protected String JavaDoc getFileNamePrefix() {
38      return getEnv().getSnapshotFileNamePrefix();
39     }
40     
41     protected FilenameFilter JavaDoc getFileNameFilter() {
42      return new SnapShotFileNameFilter(getFileNamePrefix());
43     }
44     
45     protected String JavaDoc getMonitoredDirectory() {
46      return getEnv().getDirectoryToStoreBackupFiles();
47     }
48 }
49
Popular Tags