PeerCache
Keywords: uk.ac.ic.doc.automed.p2p.PeerCache class

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

## uk.ac.ic.doc.automed.p2p
Class PeerCache

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.PeerCache

    public class PeerCache

extends java.lang.Object

Author:
  Charis A cache of information fetched from the `directory.P2PDirectory` for the local `AutoMedPeer`

Field Summary
`java.util.Set` | `mySchemas`
`java.util.Map` | `otherPeers`
`java.util.HashSet` | `publicSchemas`

Constructor Summary
`PeerCache(AutoMedPeer myPeer)`

Method Summary
`java.util.Set` | `getMySchemas()`
`java.util.HashSet` | `getPeerDescriptions(SchemaDescription schema)` Return a `Map` of `PeerDescription`s for a given `SchemaDescription`.
`java.util.Set` | `getPublicSchemas()` Return a `Set` containing `SchemaDescription`s
`void` | `initialiseCache()`
`boolean` | `isSchemaInfoCached(java.lang.String schema)`
`void` | `refreshMySchemas()`
`java.util.HashSet` | `refreshPeersOf(SchemaDescription schema)`
`java.util.HashSet` | `refreshPublicSchemas()`
`void` | `setPublicSchemas(java.util.List schemas)` Assign a list of public schemas (i.e.
`java.lang.String` | `toString()`

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

Field Detail

### mySchemas

    public java.util.Set mySchemas

### publicSchemas

    public java.util.HashSet publicSchemas

### otherPeers

    public java.util.Map otherPeers

Constructor Detail

### PeerCache

    public PeerCache(AutoMedPeer myPeer)

Method Detail

### initialiseCache

    public void initialiseCache()
                         throws UnsuccessfulReplyException,
                                java.io.IOException,
                                AutoMedException

  Throws:
    `UnsuccessfulReplyException`
    `java.io.IOException`
    `AutoMedException`

### refreshPeersOf

    public java.util.HashSet refreshPeersOf(SchemaDescription schema)
                                     throws UnsuccessfulReplyException,
                                            java.io.IOException,
                                            AutoMedException

  Throws:
    `UnsuccessfulReplyException`
    `java.io.IOException`
    `AutoMedException`

### refreshPublicSchemas

    public java.util.HashSet refreshPublicSchemas()
                                           throws UnsuccessfulReplyException,
                                                  java.io.IOException,
                                                  AutoMedException

  Throws:
    `UnsuccessfulReplyException`
    `java.io.IOException`
    `AutoMedException`

### refreshMySchemas

    public void refreshMySchemas()
                          throws UnsuccessfulReplyException,
                                 java.io.IOException,
                                 AutoMedException

  Throws:
    `UnsuccessfulReplyException`
    `java.io.IOException`
    `AutoMedException`

### getPeerDescriptions

    public java.util.HashSet getPeerDescriptions(SchemaDescription schema)

  Return a `Map` of `PeerDescription`s for a given `SchemaDescription`.

### isSchemaInfoCached

    public boolean isSchemaInfoCached(java.lang.String schema)

### getPublicSchemas

    public java.util.Set getPublicSchemas()

  Return a `Set` containing `SchemaDescription`s

### setPublicSchemas

    public void setPublicSchemas(java.util.List schemas)

  Assign a list of public schemas (i.e. `SchemaDescription`s) to cache

### getMySchemas

    public java.util.Set getMySchemas()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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