add channel name setter

This commit is contained in:
Dennis Klein 2017-05-13 16:47:21 +02:00 committed by Mohammad Al-Turany
parent 463a49d79c
commit 3cb80de773
2 changed files with 20 additions and 0 deletions

View File

@ -424,6 +424,22 @@ auto FairMQChannel::SetModified(const bool modified) -> void
}
}
void FairMQChannel::UpdateChannelName(const string& name)
{
try
{
unique_lock<mutex> lock(fChannelMutex);
fIsValid = false;
fName = name;
fModified = true;
}
catch (exception& e)
{
LOG(ERROR) << "Exception caught in FairMQChannel::UpdateChannelName: " << e.what();
exit(EXIT_FAILURE);
}
}
bool FairMQChannel::IsValid() const
{
try

View File

@ -135,6 +135,10 @@ class FairMQChannel
/// @param rateLogging Socket rate logging interval (in seconds)
void UpdateRateLogging(const int rateLogging);
/// Set channel name
/// @param name Arbitrary channel name
void UpdateChannelName(const std::string& name);
/// Checks if the configured channel settings are valid (checks the validity parameter, without running full validation (as oposed to ValidateChannel()))
/// @return true if channel settings are valid, false otherwise.
bool IsValid() const;