28 #include "NamespaceHelper.h" 32 ONIXS_HANDLER_NAMESPACE_BEGIN
34 ThreadAffinity::ThreadAffinity()
35 : indices_(new CpuIndexes())
40 : indices_(new CpuIndexes())
42 *indices_ = *other.indices_;
52 return indices_->empty();
57 indices.insert(indices_->begin(), indices_->end());
62 return indices_->insert(index).second;
67 return indices_->erase(index);
77 *indices_ = *other.indices_;
85 Util::TextBuilder builder;
86 builder << Util::JoinWrapper<CpuIndexes>(*indices_,
",");
87 return builder.toString();
94 , spinBeforeIdleTime_(1)
95 , socketBufferSize_(8 * 1024 * 1024)
112 stream <<
"FeedEngineSettings [dataWaitTime=" << settings.
dataWaitTime()
114 <<
", " <<
"threadCount=" << settings.
threadCount()
123 ONIXS_HANDLER_NAMESPACE_END
FeedEngineSettings()
Initializes options with default values.
ThreadAffinity & operator=(const ThreadAffinity &)
Re-initializes instance as copy of other set.
void clear()
Makes set empty.
bool erase(CpuIndex index)
Removes CPU index from the set.
Represents set of CPU indices.
UInt32 socketBufferSize() const
size_t CpuIndex
Zero-based index of CPU.
~FeedEngineSettings()
Cleans everything up.
~ThreadAffinity()
Utilizes all the resources.
void copyTo(CpuIndexes &) const
Copies set into another set.
const ThreadAffinity & threadAffinity() const
std::string toString() const
Returns the string representation.
UInt32 spinBeforeIdleTime() const
ONIXS_SGXTITAN_ITCH_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
UInt32 dataWaitTime() const
UInt32 threadCount() const
Collection of settings affecting Feed Engine behavior.
std::string toString() const
Returns the string representation.
bool insert(CpuIndex index)
Adds CPU index into set.
ThreadAffinity()
Initializes empty set.
bool empty() const
Indicates whether is empty.