|
@@ -310,77 +310,10 @@ public:
|
|
/// If there was no forwarder yet, this method does nothing.
|
|
/// If there was no forwarder yet, this method does nothing.
|
|
void destroyDDNSForwarder();
|
|
void destroyDDNSForwarder();
|
|
|
|
|
|
- /// \brief Swap the currently used set of data source client lists with
|
|
|
|
- /// given one.
|
|
|
|
- ///
|
|
|
|
- /// The "set" of lists is actually given in the form of map from
|
|
|
|
- /// RRClasses to shared pointers to isc::datasrc::ConfigurableClientList.
|
|
|
|
- ///
|
|
|
|
- /// This method returns the swapped set of lists, which was previously
|
|
|
|
- /// used by the server.
|
|
|
|
- ///
|
|
|
|
- /// This method is intended to be used by a separate method to update
|
|
|
|
- /// the data source configuration "at once". The caller must hold
|
|
|
|
- /// a lock for the mutex object returned by \c getDataSrcClientListMutex()
|
|
|
|
- /// before calling this method.
|
|
|
|
- ///
|
|
|
|
- /// The ownership of the returned pointer is transferred to the caller.
|
|
|
|
- /// The caller is generally expected to release the resources used in
|
|
|
|
- /// the old lists. Note that it could take longer time if some of the
|
|
|
|
- /// data source clients contain a large size of in-memory data.
|
|
|
|
- ///
|
|
|
|
- /// The caller can pass a NULL pointer. This effectively disables
|
|
|
|
- /// any data source for the server.
|
|
|
|
- ///
|
|
|
|
- /// \param new_lists Shared pointer to a new set of data source client
|
|
|
|
- /// lists.
|
|
|
|
- /// \return The previous set of lists. It can be NULL.
|
|
|
|
- isc::datasrc::DataSrcClientListsPtr
|
|
|
|
- swapDataSrcClientLists(isc::datasrc::DataSrcClientListsPtr new_lists);
|
|
|
|
-
|
|
|
|
- /// \brief Returns the currently used client list for the class.
|
|
|
|
- ///
|
|
|
|
- /// \param rrclass The class for which to get the list.
|
|
|
|
- /// \return The list, or NULL if no list is set for the class.
|
|
|
|
- boost::shared_ptr<isc::datasrc::ConfigurableClientList>
|
|
|
|
- getDataSrcClientList(const isc::dns::RRClass& rrclass);
|
|
|
|
-
|
|
|
|
- /// \brief Return a mutex for the client lists.
|
|
|
|
- ///
|
|
|
|
- /// Background loading of data uses threads. Therefore we need to protect
|
|
|
|
- /// the client lists by a mutex, so they don't change (or get destroyed)
|
|
|
|
- /// during query processing. Get (and lock) this mutex whenever you do
|
|
|
|
- /// something with the lists and keep it locked until you finish. This
|
|
|
|
- /// is correct:
|
|
|
|
- /// \code
|
|
|
|
- /// {
|
|
|
|
- /// Mutex::Locker locker(auth->getDataSrcClientListMutex());
|
|
|
|
- /// boost::shared_ptr<isc::datasrc::ConfigurableClientList>
|
|
|
|
- /// list(auth->getDataSrcClientList(RRClass::IN()));
|
|
|
|
- /// // Do some processing here
|
|
|
|
- /// }
|
|
|
|
- /// \endcode
|
|
|
|
- ///
|
|
|
|
- /// But this is not (it releases the mutex too soon):
|
|
|
|
- /// \code
|
|
|
|
- /// boost::shared_ptr<isc::datasrc::ConfigurableClientList> list;
|
|
|
|
- /// {
|
|
|
|
- /// Mutex::Locker locker(auth->getDataSrcClientListMutex());
|
|
|
|
- /// list = auth->getDataSrcClientList(RRClass::IN()));
|
|
|
|
- /// }
|
|
|
|
- /// // Do some processing here
|
|
|
|
- /// \endcode
|
|
|
|
- ///
|
|
|
|
- /// \note This method is const even if you are allowed to modify
|
|
|
|
- /// (lock) the mutex. It's because locking of the mutex is not really
|
|
|
|
- /// a modification of the server object and it is needed to protect the
|
|
|
|
- /// lists even on read-only operations.
|
|
|
|
- isc::util::thread::Mutex& getDataSrcClientListMutex() const;
|
|
|
|
-
|
|
|
|
/// \brief Sets the timeout for incoming TCP connections
|
|
/// \brief Sets the timeout for incoming TCP connections
|
|
///
|
|
///
|
|
/// Incoming TCP connections that have not sent their data
|
|
/// Incoming TCP connections that have not sent their data
|
|
- /// withing this time are dropped.
|
|
|
|
|
|
+ /// within this time are dropped.
|
|
///
|
|
///
|
|
/// \param timeout The timeout (in milliseconds). If se to
|
|
/// \param timeout The timeout (in milliseconds). If se to
|
|
/// zero, no timeouts are used, and the connection will remain
|
|
/// zero, no timeouts are used, and the connection will remain
|