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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
mySchemas
public java.util.Set mySchemas
publicSchemas
public java.util.HashSet publicSchemas
otherPeers
public java.util.Map otherPeers
PeerCache
public PeerCache(AutoMedPeer myPeer)
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 PeerDescriptions for
a given SchemaDescription.
isSchemaInfoCached
public boolean isSchemaInfoCached(java.lang.String schema)
getPublicSchemas
public java.util.Set getPublicSchemas()
- Return a
Set containing SchemaDescriptions
setPublicSchemas
public void setPublicSchemas(java.util.List schemas)
- Assign a list of public schemas (i.e.
SchemaDescriptions) to cache
getMySchemas
public java.util.Set getMySchemas()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object