class PNRServent

The PNRServent contains a PNR client, server, and manager. The servent controls the behavior of its components and stores data structures shared by each component.

Public Methods

[more] PNRServent(Computer* _host = NULL, PNRStrategy _strategy = MANAGER)
[more] ~PNRServent()
[more]void setPeers(map <ID, Computer>* computers)
Get a list of peers from the system and remember it for later.
[more]void setMagicKnowledge(bool know = false)
Tell components whether they are allowed to use global knowledge or not
[more]void setManagers(const unsigned int num = 0)
Set how many managers there will be in the current system
[more]void setServerThreshold(const MEMAMT threshold = 0.1)
Sets the mimimum amount of RAM servers require to be idle before they start allocating network RAM.
[more]ID getActiveServent(ID masterThreadHost, ID currentThreadHost, ID jobID = 0)
Returns the manager that will service the client's request.
[more]bool broadcastingServent()
[more]bool waitForOtherPeers()
[more]PNRServer* getServer(void) const
[more]PNRClient* getClient(void) const
[more]PNRManager* getManager(void) const
[more]PNRStrategy getStrategy(void) const
[more]const list<ID> & getManagerList(void) const


Documentation

The PNRServent contains a PNR client, server, and manager. The servent controls the behavior of its components and stores data structures shared by each component.
o PNRServent(Computer* _host = NULL, PNRStrategy _strategy = MANAGER)

o ~PNRServent()

ovoid setPeers(map <ID, Computer>* computers)

ovoid setMagicKnowledge(bool know = false)

ovoid setManagers(const unsigned int num = 0)
This method should only be called when using the "backbone" PNR algorithm

ovoid setServerThreshold(const MEMAMT threshold = 0.1)

oID getActiveServent(ID masterThreadHost, ID currentThreadHost, ID jobID = 0)
What manager is returned depends on which PNR algorithms are being used. For instance, if the centralized algorithm is being used, then the 0th manager is always returned.

obool broadcastingServent()
Returns:
whether the servent will broadcast load information after job start/stop

obool waitForOtherPeers()
Returns:
whether the servent waits for other servents when performing operations (such as network RAM allocation).

oPNRServer* getServer(void) const
Returns:
a pointer to the servent's server.

oPNRClient* getClient(void) const
Returns:
a pointer to the servent's client

oPNRManager* getManager(void) const
Returns:
a pointer to the servent's manager

oPNRStrategy getStrategy(void) const
Returns:
an enumerated type that represents what PNR algorithm is being used.

oconst list<ID> & getManagerList(void) const
Returns:
the list of managers currently in the system.


This class has no child classes.
Author:
John Oleszkiewicz

Alphabetic index HTML hierarchy of classes or Java



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