Generic PNR peer - other peers inherit from this class.
Inheritance:
Public Methods
-
PNRAgent(Computer* _host = NULL)
-
-
~PNRAgent()
-
-
void setHost(Computer* _host = NULL)
- Set the host the peer currently resides on
-
void setGrantingThreshold(const MEMAMT _newThreshold = 0.1)
- Set the RAM threshold PNR servers will be using
-
Computer* getHost(void) const
-
-
void setAvailabilityTable(map<Computer*, MEMAMT>* table)
- Set a reference to the availability table of the servent
-
void setComputerTable(map<ID, Computer>* table)
- Set a reference to the computer table of the servent
-
void loadMagicKnowledge()
- Loads current information about each computer into the availability table
-
void setMagicKnowledge()
- Sets whether magic knowledge will be used or not.
-
Computer* selectServer()
- Select a networkRAM server from a list of available servers
-
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.
PNRAgent(Computer* _host = NULL)
-
~PNRAgent()
-
void setHost(Computer* _host = NULL)
-
void 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.
Computer* getHost(void) const
-
- Returns:
- the host the peer currently resides on
void 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.
void setComputerTable(map<ID, Computer>* table)
-
void loadMagicKnowledge()
-
This method is invoked when peers are using "magic" knowledge. That is, peers are allowed
to instantly know global information about the system
void setMagicKnowledge()
-
Computer* 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.
bool 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++.