Tie in blacklist code.

This commit is contained in:
JoelKatz
2013-09-24 13:00:11 -07:00
parent f61caaae09
commit 5d63086b69
9 changed files with 99 additions and 20 deletions

View File

@@ -63,8 +63,9 @@ public:
/** Construct a load source with a given name.
The endpoint is considered non-privileged.
*/
explicit LoadSource (std::string const& name)
explicit LoadSource (std::string const& name, std::string const& costName)
: mName (name)
, mCostName (costName)
, mBalance (0)
, mFlags (0)
, mLastUpdate (UptimeTimer::getInstance ().getElapsedSeconds ())
@@ -81,9 +82,10 @@ public:
// VFALCO TODO Figure out a way to construct the LoadSource object with
// the proper name instead of renaming it later.
//
void rename (std::string const& name) noexcept
void rename (std::string const& name, std::string const& costName) noexcept
{
mName = name;
mCostName = costName;
}
/** Retrieve the name of this endpoint.
@@ -93,6 +95,11 @@ public:
return mName;
}
std::string const& getCostName () const noexcept
{
return mCostName;
}
/** Determine if this endpoint is privileged.
*/
bool isPrivileged () const noexcept
@@ -154,7 +161,8 @@ private:
static const int lsfOutbound = 2;
private:
std::string mName;
std::string mName; // Name of this particular load source, can include details like ports
std::string mCostName; // The name to "charge" for load from this connection
int mBalance;
int mFlags;
int mLastUpdate;