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

## network
Class RepositoryPoller

    java.lang.Object
      network.RepositoryPoller

    public class RepositoryPoller

extends java.lang.Object

Purpouse of this class is to find computers willing to store our backup files. This class multicasts request message containg basic information about backup like its size and number of fragments. Responces are then collected and stored within RepoHost container class. Polls sourced at random port.

See Also:
  `RepoHost`

Constructor Summary
`RepositoryPoller()`

Method Summary
`void` | `delete(BackupMetaContainer meta)` Requests network peers to delete backup.
`BackupMetaContainer[]` | `pollForFilename(java.lang.String filename)` This method polls networked host for existing backup.
`java.util.HashMap<java.lang.String,java.util.Vector<java.net.InetAddress>>` | `pollForFragments(BackupMetaContainer meta)` This method polls networked host for existing backup.
`RepoHost[]` | `pollForNewBackup(BackupMetaContainer meta)` Multicast request message containing size of one backup fragment in MB.

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

Constructor Detail

### RepositoryPoller

    public RepositoryPoller()

Method Detail

### pollForNewBackup

    public RepoHost[] pollForNewBackup(BackupMetaContainer meta)

  Multicast request message containing size of one backup fragment in MB. All computers capable of storing such fragment should respond with UDP message containg Xml of their RepoHost. Computers must respond within timeout as specified by RCV_TIMEOUT otherwise their response will be ignored and discarded.

  Parameters:
    `meta` - meta information abou file to be backed up
  Returns:
    array of RepoHost willing to participate

### pollForFragments

    public java.util.HashMap<java.lang.String,java.util.Vector<java.net.InetAddress>> pollForFragments(BackupMetaContainer meta)

  This method polls networked host for existing backup. Any hosts storing any files related to requested backup respond with list of related files they store. Result is hash map mapping filenames and list of addresses of hosts on which this files are stored.

  Parameters:
    `meta` - metadata container of backup
  Returns:
    Hashmap mapping filenames and addresses

### pollForFilename

    public BackupMetaContainer[] pollForFilename(java.lang.String filename)

  This method polls networked host for existing backup. Any hosts storing any backup of requested filename respond with list of related files they store. Result is hash map mapping filenames and list of addresses of hosts on which this files are stored.

  Parameters:
    `filename` - name of file for which network peers are polled
  Returns:
    Hashmap mapping filenames and addresses

### delete

    public void delete(BackupMetaContainer meta)

  Requests network peers to delete backup.

  Parameters:
    `meta` - metadata of backup to be deleted

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