class PNRAgent

Generic PNR peer - other peers inherit from this class.

Inheritance:


Public Methods

[more] PNRAgent(Computer* _host = NULL)
[more] ~PNRAgent()
[more]void setHost(Computer* _host = NULL)
Set the host the peer currently resides on
[more]void setGrantingThreshold(const MEMAMT _newThreshold = 0.1)
Set the RAM threshold PNR servers will be using
[more]Computer* getHost(void) const
[more]void setAvailabilityTable(map<Computer*, MEMAMT>* table)
Set a reference to the availability table of the servent
[more]void setComputerTable(map<ID, Computer>* table)
Set a reference to the computer table of the servent
[more]void loadMagicKnowledge()
Loads current information about each computer into the availability table
[more]void setMagicKnowledge()
Sets whether magic knowledge will be used or not.
[more]Computer* selectServer()
Select a networkRAM server from a list of available servers
[more]bool serverAvailable()
Indicates if a remote server has network RAM available for a manager's allocation


Documentation

An object that all PNR servers, managers, and clients inherit from Provides data structures and services that are common across all the types of peers.
o PNRAgent(Computer* _host = NULL)

o ~PNRAgent()

ovoid setHost(Computer* _host = NULL)

ovoid setGrantingThreshold(const MEMAMT _newThreshold = 0.1)
The RAM threshold indicates how much RAM must be idle before a server will grant network RAM to a remote client.

oComputer* getHost(void) const
Returns:
the host the peer currently resides on

ovoid setAvailabilityTable(map<Computer*, MEMAMT>* table)
The availability table is used to select servers, etc. One availability table is stored in the PNR servent - and many agents (clients/managers/servers) may access it.

ovoid setComputerTable(map<ID, Computer>* table)

ovoid loadMagicKnowledge()
This method is invoked when peers are using "magic" knowledge. That is, peers are allowed to instantly know global information about the system

ovoid setMagicKnowledge()

oComputer* selectServer()
The selection process is based on the manager's information on how much network RAM various servers have available. This information may be out-of-date since it is updated via message passing.

obool serverAvailable()


Direct child classes:
PNRServer
PNRManager
PNRClient
Author:
John Oleszkiewicz

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.