\hypertarget{classIfMgrXrlReplicator}{
\section{IfMgrXrlReplicator Class Reference}
\label{classIfMgrXrlReplicator}\index{IfMgrXrlReplicator@{IfMgrXrlReplicator}}
}


Class that sends a configuration information to a remote mirror of IfMgr configuration state.  




{\ttfamily \#include $<$ifmgr\_\-xrl\_\-replicator.hh$>$}

Inheritance diagram for IfMgrXrlReplicator:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=4.000000cm]{classIfMgrXrlReplicator}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIfMgrXrlReplicator_a3996a13d45a96bc15910e875368513b0}{
typedef \hyperlink{classref__ptr}{IfMgrCommandSinkBase::Cmd} {\bfseries Cmd}}
\label{classIfMgrXrlReplicator_a3996a13d45a96bc15910e875368513b0}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIfMgrXrlReplicator_a33aa8e004e6da9cf599493079c9fe111}{
\hyperlink{classIfMgrXrlReplicator_a33aa8e004e6da9cf599493079c9fe111}{IfMgrXrlReplicator} (\hyperlink{classXrlSender}{XrlSender} \&sender, const string \&xrl\_\-target\_\-name)}
\label{classIfMgrXrlReplicator_a33aa8e004e6da9cf599493079c9fe111}

\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a92034ece5be5cc16793f8518979f035d}{
void \hyperlink{classIfMgrXrlReplicator_a92034ece5be5cc16793f8518979f035d}{push} (const \hyperlink{classref__ptr}{Cmd} \&cmd)}
\label{classIfMgrXrlReplicator_a92034ece5be5cc16793f8518979f035d}

\begin{DoxyCompactList}\small\item\em Add a command to be sent as an \hyperlink{classXrl}{Xrl} to \hyperlink{protocolthe-p}{the} remote target. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a6d1197757ac5c16c5506aac86c1b9d7e}{
void \hyperlink{classIfMgrXrlReplicator_a6d1197757ac5c16c5506aac86c1b9d7e}{crank\_\-replicator} ()}
\label{classIfMgrXrlReplicator_a6d1197757ac5c16c5506aac86c1b9d7e}

\begin{DoxyCompactList}\small\item\em Schedule \hyperlink{protocolthe-p}{the} next \hyperlink{classXrl}{Xrl} dispatch. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a5bfad6c08819a9aaefb14dfc3134dd49}{
const string \& \hyperlink{classIfMgrXrlReplicator_a5bfad6c08819a9aaefb14dfc3134dd49}{xrl\_\-target\_\-name} () const }
\label{classIfMgrXrlReplicator_a5bfad6c08819a9aaefb14dfc3134dd49}

\begin{DoxyCompactList}\small\item\em Accessor for xrl target name. \item\end{DoxyCompactList}\item 
bool \hyperlink{classIfMgrXrlReplicator_a498a3a53119ef9c76cbdd1aca82ed9f4}{is\_\-empty\_\-queue} () const 
\begin{DoxyCompactList}\small\item\em Test whether \hyperlink{protocolthe-p}{the} queue with \hyperlink{protocolthe-p}{the} commands is empty. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIfMgrXrlReplicator_a9ed77dbacc4c6ed96264ba97d2fecf42}{
virtual void \hyperlink{classIfMgrXrlReplicator_a9ed77dbacc4c6ed96264ba97d2fecf42}{crank\_\-manager} ()}
\label{classIfMgrXrlReplicator_a9ed77dbacc4c6ed96264ba97d2fecf42}

\begin{DoxyCompactList}\small\item\em Method invoked when it is time to schedule \hyperlink{protocolthe-p}{the} next \hyperlink{classXrl}{Xrl} dispatch. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a6fa0c2c1c6dfbebe5c49f6fb1d8bbae7}{
virtual void \hyperlink{classIfMgrXrlReplicator_a6fa0c2c1c6dfbebe5c49f6fb1d8bbae7}{crank\_\-manager\_\-cb} ()}
\label{classIfMgrXrlReplicator_a6fa0c2c1c6dfbebe5c49f6fb1d8bbae7}

\begin{DoxyCompactList}\small\item\em Method invoked when \hyperlink{protocolthe-p}{the} previous \hyperlink{classXrl}{Xrl} dispatch has completed. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a81c79d5e7c94aef730435f39f17896ee}{
virtual void \hyperlink{classIfMgrXrlReplicator_a81c79d5e7c94aef730435f39f17896ee}{push\_\-manager\_\-queue} ()}
\label{classIfMgrXrlReplicator_a81c79d5e7c94aef730435f39f17896ee}

\begin{DoxyCompactList}\small\item\em Method invoked when a command should be added to \hyperlink{protocolthe-p}{the} manager's queue. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_aa8bf932e5579248ea80f3002d42c162e}{
virtual void \hyperlink{classIfMgrXrlReplicator_aa8bf932e5579248ea80f3002d42c162e}{xrl\_\-error\_\-event} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classIfMgrXrlReplicator_aa8bf932e5579248ea80f3002d42c162e}

\begin{DoxyCompactList}\small\item\em Method invoked when an \hyperlink{classXrl}{Xrl} dispatch fails. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_a8f0b99dcd018f9a297d9474e8b9905f7}{
\hyperlink{classIfMgrXrlReplicator_a8f0b99dcd018f9a297d9474e8b9905f7}{IfMgrXrlReplicator} ()}
\label{classIfMgrXrlReplicator_a8f0b99dcd018f9a297d9474e8b9905f7}

\begin{DoxyCompactList}\small\item\em Not implemented. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_ad01d0533e59314ecdeb1d9bc2b4ef43f}{
\hyperlink{classIfMgrXrlReplicator_ad01d0533e59314ecdeb1d9bc2b4ef43f}{IfMgrXrlReplicator} (const \hyperlink{classIfMgrXrlReplicator}{IfMgrXrlReplicator} \&)}
\label{classIfMgrXrlReplicator_ad01d0533e59314ecdeb1d9bc2b4ef43f}

\begin{DoxyCompactList}\small\item\em Not implemented. \item\end{DoxyCompactList}\item 
\hypertarget{classIfMgrXrlReplicator_ab8c19685ef9f5ca6feba3bb133ec423c}{
\hyperlink{classIfMgrXrlReplicator}{IfMgrXrlReplicator} \& \hyperlink{classIfMgrXrlReplicator_ab8c19685ef9f5ca6feba3bb133ec423c}{operator=} (const \hyperlink{classIfMgrXrlReplicator}{IfMgrXrlReplicator} \&)}
\label{classIfMgrXrlReplicator_ab8c19685ef9f5ca6feba3bb133ec423c}

\begin{DoxyCompactList}\small\item\em Not implemented. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIfMgrXrlReplicator_ac3495d0c60b31e37e152827db733ea6c}{
\hyperlink{classXrlSender}{XrlSender} \& {\bfseries \_\-s}}
\label{classIfMgrXrlReplicator_ac3495d0c60b31e37e152827db733ea6c}

\item 
\hypertarget{classIfMgrXrlReplicator_a46f29261ad29eb972565e723e99d0d86}{
string {\bfseries \_\-tgt}}
\label{classIfMgrXrlReplicator_a46f29261ad29eb972565e723e99d0d86}

\item 
\hypertarget{classIfMgrXrlReplicator_ab09e8f75098e26960d0d7396e7d12787}{
\hyperlink{classIfMgrCommandFifoQueue}{IfMgrCommandFifoQueue} {\bfseries \_\-queue}}
\label{classIfMgrXrlReplicator_ab09e8f75098e26960d0d7396e7d12787}

\item 
\hypertarget{classIfMgrXrlReplicator_abf482be94c64f022a405080f28c0b89e}{
bool {\bfseries \_\-pending}}
\label{classIfMgrXrlReplicator_abf482be94c64f022a405080f28c0b89e}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classIfMgrXrlReplicator_a9eb1633eabddd764dab1c2134f2a8636}{
void {\bfseries xrl\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classIfMgrXrlReplicator_a9eb1633eabddd764dab1c2134f2a8636}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class that sends a configuration information to a remote mirror of IfMgr configuration state. The \hyperlink{classIfMgrXrlReplicator}{IfMgrXrlReplicator} contains an \hyperlink{classIfMgrCommandFifoQueue}{IfMgrCommandFifoQueue} and adds commands to it when \hyperlink{classIfMgrXrlReplicator_a92034ece5be5cc16793f8518979f035d}{IfMgrXrlReplicator::push} is called. Invoking push also cranks \hyperlink{protocolthe-p}{the} queue if an \hyperlink{classXrl}{Xrl} dispatch is not in progress. Cranking causes \hyperlink{protocolthe-p}{the} \hyperlink{classXrl}{Xrl} at \hyperlink{protocolthe-p}{the} head of \hyperlink{protocolthe-p}{the} queue to be dispatched.

On \hyperlink{protocolthe-p}{the} successful dispatch of an \hyperlink{classXrl}{Xrl}, \hyperlink{protocolthe-p}{the} next command ready for dispatching as an \hyperlink{classXrl}{Xrl} is taken from \hyperlink{protocolthe-p}{the} queue and dispatched if available. If no command is available, processing stops. If an \hyperlink{classXrl}{Xrl} dispatch fails, \hyperlink{protocolthe-p}{the} overrideable method \hyperlink{classIfMgrXrlReplicator_aa8bf932e5579248ea80f3002d42c162e}{IfMgrXrlReplicator::xrl\_\-error\_\-event} is called. After an error, \hyperlink{protocolthe-p}{the} queue processing stops and \hyperlink{protocolthe-p}{the} \hyperlink{classIfMgrXrlReplicator}{IfMgrXrlReplicator} instance should in most cases be destructed. 

\subsection{Member Function Documentation}
\hypertarget{classIfMgrXrlReplicator_a498a3a53119ef9c76cbdd1aca82ed9f4}{
\index{IfMgrXrlReplicator@{IfMgrXrlReplicator}!is\_\-empty\_\-queue@{is\_\-empty\_\-queue}}
\index{is\_\-empty\_\-queue@{is\_\-empty\_\-queue}!IfMgrXrlReplicator@{IfMgrXrlReplicator}}
\subsubsection[{is\_\-empty\_\-queue}]{\setlength{\rightskip}{0pt plus 5cm}bool IfMgrXrlReplicator::is\_\-empty\_\-queue (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classIfMgrXrlReplicator_a498a3a53119ef9c76cbdd1aca82ed9f4}


Test whether \hyperlink{protocolthe-p}{the} queue with \hyperlink{protocolthe-p}{the} commands is empty. 

\begin{DoxyReturn}{Returns}
trie if \hyperlink{protocolthe-p}{the} queue with \hyperlink{protocolthe-p}{the} commans is empty, otherwise false. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libfeaclient/ifmgr\_\-xrl\_\-replicator.hh\item 
/home/greearb/git/xorp.ct.github/xorp/libfeaclient/ifmgr\_\-xrl\_\-replicator.cc\end{DoxyCompactItemize}
