Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## main
Class AppManager

    java.lang.Object
      main.AppManager

    public class AppManager

extends java.lang.Object

Singleton adapter for managing services. Provides access to functions of aplication in library like manner.

Method Summary
`static void` | `backupFile(java.lang.String fileName)`
`static void` | `backupFile(java.lang.String fileName, int n, int m)` Starts process of file backup.
`static void` | `delete(BackupMetaContainer meta)` Given meta information of backup this method deletes backup represented by it from distributed repository.
`static void` | `delete(BackupMetaContainer meta, boolean repeat)` Given meta information of backup this method deletes backup represented by it from distributed repository.
`static AppManager` | `getManager()` Returns AppManager if it has been already initialized or null otherwise.
`static void` | `init()` Starts application servers only if they are not already running.
`static void` | `lowInit()` Performs low level initialization, so more complex task can be performed.
`static void` | `recover(BackupMetaContainer meta, java.io.File dest)` Begins recovery of file identified by metafile and saves it into specified filename.
`static BackupMetaContainer[]` | `searchBackups(java.lang.String filename)` Performs search for filename that was previously backed up.
`static void` | `stop()` Stops application servers and disposes application manager.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getManager

    public static AppManager getManager()

  Returns AppManager if it has been already initialized or null otherwise.

  Returns:
    instance AppManager or null

### init

    public static void init()
                     throws java.lang.Exception

  Starts application servers only if they are not already running. Performs initialization of application.

  Throws:
    `java.lang.Exception` - if error starting servers.

### lowInit

    public static void lowInit()

  Performs low level initialization, so more complex task can be performed.

### stop

    public static void stop()

  Stops application servers and disposes application manager.

### backupFile

    public static void backupFile(java.lang.String fileName)

### backupFile

    public static void backupFile(java.lang.String fileName,
                                  int n,
                                  int m)

  Starts process of file backup.

  Parameters:
    `fileName` - name of file to be backed up
    `n` - desired number of file fragments
    `m` - desired number of file checksums

### recover

    public static void recover(BackupMetaContainer meta,
                               java.io.File dest)

  Begins recovery of file identified by metafile and saves it into specified filename.

  Parameters:
    `meta` - metafile containing identification of backup
    `dest` - File into which recovered file should be saved

### searchBackups

    public static BackupMetaContainer[] searchBackups(java.lang.String filename)

  Performs search for filename that was previously backed up. Network hosts storing fragments of any backup related to that file respond with meta information of that backups.

  Parameters:
    `filename` - name of file that was backed up
  Returns:
    BackupMetaContainer[] array holding meta info of found backups.

### delete

    public static void delete(BackupMetaContainer meta)

  Given meta information of backup this method deletes backup represented by it from distributed repository.

  Parameters:
    `meta` - information about any backup to be deleted

### delete

    public static void delete(BackupMetaContainer meta,
                              boolean repeat)

  Given meta information of backup this method deletes backup represented by it from distributed repository. This method also provides certain way to ensure, that all related fragments of backup have been deleted.

  Parameters:
    `meta` - information about any backup to be deleted
    `repeat` - true if additional measures to ensure backup erasure are to // * be taken, false otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD