KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > pluggable > BackupEnvironment


1 /*
2  * BackupEnvironment.java
3  *
4  * Created on December 19, 2003, 10:11 PM
5  */

6
7 package com.sun.enterprise.config.backup.pluggable;
8
9 /**
10  * BackupEnvironment Interface holds all the environment
11  * information about the functionality. In particular,
12  * source and destination paths, number of backups, etc.
13  *
14  * Implementation of this interface can be of different
15  * types. Implementation can read from properties file
16  * or allow users to set it explicitly or pass it in
17  * as environment variables. There is no restriction
18  * to making this interface dynamic but it is advised
19  * to make the implementation final to avoid complexity.
20  *
21  * To aid the above point, this interface is designed
22  * as READ ONLY and has only getters.
23  *
24  * @author sridatta
25  */

26 public interface BackupEnvironment {
27
28     // Methods related to Execution Environment
29

30     /*
31      * Can be offline or Online as defined
32      * in StatusConstants
33      */

34     String JavaDoc getExecutionType();
35     
36     /**
37      * Keeps backups upto max backups. After that many backups,
38      * oldest backup is deleted.
39      */

40     int getMaxBackups();
41     int getMaxSnapShots();
42     
43     /**
44      * Type of storage like directory, zip, etc
45      */

46     String JavaDoc getBackupStorageType();
47     
48     // Relative path Names or name prefixes
49

50     /**
51      * name of the snapshot file
52      * Timestamp is added to this prefix
53      */

54     String JavaDoc getSnapshotFileNamePrefix();
55     
56     
57     /**
58      * prefix to be used for backup files
59      * timestamp and the backup number is
60      * added to this prefix
61      */

62     String JavaDoc getBackupFileNamePrefix();
63     
64     /**
65      * Name of the history file
66      */

67     String JavaDoc getBackupHistoryFileName();
68     
69     
70     
71     // location Methods
72

73     /**
74      * directories on which backup and
75      * restore action is performed.
76      * Note that the directories are
77      * absolute paths.
78      */

79     String JavaDoc[] getDirectoriesToBackup();
80     
81     /**
82      * Get the absolute directory where backup
83      * files are to be stored
84      */

85     String JavaDoc getDirectoryToStoreBackupFiles ();
86     
87     /**
88      * get the absolute directory where snapshot file
89      * is to be stored. This can be different from the
90      * directory where backup files are stored
91      */

92     String JavaDoc getDirectoryToStoreSnapshotFile();
93     
94     /**
95      * get the absolute Directory where history file
96      * is stored
97      */

98     String JavaDoc getDirectoryToStoreHistoryFile();
99     
100     /**
101      * name of the status info file that is added to backed
102      * up storage
103      */

104     String JavaDoc getStatusInfoFileName();
105 }
106
Popular Tags