15 const std::string& remoteHost,
20 remoteHost_(remoteHost),
21 consumerName_(consumerName),
22 queueSize_(queueSize),
23 queuePolicy_(queuePolicy),
24 secondsToStale_(secondsToStale),
32 const std::string& remoteHost,
34 const bool useEventServingParams
36 remoteHost_(remoteHost),
51 sourceURL_ = pset.
getParameter<std::string>(
"sourceURL");
59 if ( maxEventRequestRate > 0 )
62 minEventRequestInterval_ = boost::posix_time::not_a_date_time;
76 if ( policy ==
"DiscardNew" )
80 else if ( policy ==
"DiscardOld" )
84 else if ( policy ==
"Default" )
90 XCEPT_RAISE( stor::exception::ConsumerRegistration,
91 "Unknown enqueuing policy: " + policy );
130 if ( secondsToStale > 0 )
163 return ! ( *
this == other );
180 <<
"\n Queue id: " << ri.
queueId()
181 <<
"\n Maximum size of queue: " << ri.
queueSize()
182 <<
"\n Policy used if queue is full: " << ri.
queuePolicy()
183 <<
"\n Time until queue becomes stale (seconds): " << ri.
secondsToStale().total_seconds();
TimePoint_t getCurrentTime()
const QueueID & queueId() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & consumerName() const
Duration_t secondsToDuration(double const &seconds)
utils::Duration_t minEventRequestInterval_
virtual void do_appendToPSet(edm::ParameterSet &) const =0
virtual bool operator!=(const RegistrationInfoBase &) const
edm::ParameterSet getPSet() const
const std::string & sourceURL() const
void queueInfo(std::ostream &) const
std::string consumerQueuePolicy_
virtual bool operator==(const RegistrationInfoBase &) const
boost::posix_time::time_duration Duration_t
RegistrationInfoBase(const std::string &consumerName, const std::string &remoteHost, const int &queueSize, const enquing_policy::PolicyTag &queuePolicy, const utils::Duration_t &secondsToStale)
std::string consumerName_
std::ostream & operator<<(std::ostream &os, ConsumerID id)
utils::Duration_t activeConsumerTimeout_
void addParameter(std::string const &name, T const &value)
const int & queueSize() const
tuple maxEventRequestRate
void addUntrackedParameter(std::string const &name, T const &value)
const std::string & remoteHost() const
const enquing_policy::PolicyTag & queuePolicy() const
enquing_policy::PolicyTag queuePolicy_
const utils::Duration_t & secondsToStale() const
utils::Duration_t secondsToStale_
double durationToSeconds(Duration_t const &)
virtual bool operator<(const RegistrationInfoBase &) const
const ConsumerID & consumerId() const