mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-12 16:21:13 +00:00
add channel name setter
This commit is contained in:
parent
463a49d79c
commit
3cb80de773
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user