> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# gpudbtablemonitor

> gpudbtablemonitor — Kinetica Python API

<div className="kinetica-pydoc">
  <div itemprop="articleBody">
    <div id="class-gpudbtablemonitor" className="section">
      <h1>Class GPUdbTableMonitor</h1>

      <div className="dl py class">
        <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-prename descclassname"><span className="pre">gpudb\_table\_monitor.</span></span><span className="sig-name descname"><span className="pre">GPUdbTableMonitor</span></span></div>

        <div className="dd">
          <div className="dl py class">
            <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Client"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">Client</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">db</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">table\_name</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">callback\_list</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>This class is the main client side API class implementing most of the functionalities. Implementing table monitor functions means that this class creates the server side table monitors in Kinetica and also starts listening for different events on those monitors like inserts, deletes and updates. Once the notifications (inserted records, deletions and updates) are received this class will call the different callback methods passed in the constructor.</p>
              <p>The intended use of this class is to derive from this and define the different callback methods and pass the callback methods wrapped in different callback objects of the types defined by the class <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.Type" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.Type</span></code></a>. The callback objects thus created must be passed as a list to the constructor of this class.</p>
              <p>A usage that will suffice for most cases has been given in the <code className="docutils literal notranslate"><span className="pre">examples/table\_monitor\_example.py</span></code> file. The user is requested to go through the example to get a thorough understanding of how to use this class.</p>
              <p>The readme contains the relevant links to navigate directly to the examples provided.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">db (<a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb" title="gpudb.GPUdb"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdb</span></code></a>) –</div>

                    <div className="dd">
                      <p>The <a className="reference internal" href="/content/api/python/source/gpudb#gpudb.GPUdb" title="gpudb.GPUdb"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdb</span></code></a> object which is created external to this class and passed in to facilitate calling different methods of that API. This has to be pre-initialized and must have a valid value. If this is uninitialized then the constructor will raise a <a className="reference internal" href="/content/api/python/source/gpudbexception#gpudb.GPUdbException" title="gpudb.GPUdbException"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdbException</span></code></a>.</p>
                    </div>

                    <div className="dt">table\_name (<span className="em">str</span>) –</div>

                    <div className="dd">
                      <p>The name of the Kinetica table for which a monitor is to be created. This must have a valid value and cannot be an empty string. In case this parameter does not have a valid value, the constructor will raise a <a className="reference internal" href="/content/api/python/source/gpudbexception#gpudb.GPUdbException" title="gpudb.GPUdbException"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdbException</span></code></a>.</p>
                    </div>

                    <div className="dt">callback\_list (list(<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>)) –</div>

                    <div className="dd">
                      <p>List of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a> objects</p>
                    </div>

                    <div className="dt">options (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a>) –</div>

                    <div className="dd">
                      <p>The class to encapsulate the various options that can be passed to a <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a> object to alter the behavior of the monitor instance. The details are given in the <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a> section.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <div className="dl py method">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Client.start_monitor"> <span className="sig-name descname"><span className="pre">start\_monitor</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>This the API called by the client to start the table monitor</p>
                  <p>This method has to be called to activate the table monitors which have been created in accordance to the callback objects passed in the constructor, whether this class is instantiated directly or a class derived from (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a>) is used.</p>

                  <div className="admonition seealso">
                    <p className="admonition-title">See also</p>
                    <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client.stop_monitor" title="gpudb_table_monitor.GPUdbTableMonitor.Client.stop_monitor"><code className="xref py py-meth docutils literal notranslate"><span className="pre">stop\_monitor()</span></code></a></p>
                  </div>
                </div>
              </div>

              <div className="dl py method">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Client.stop_monitor"> <span className="sig-name descname"><span className="pre">stop\_monitor</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>This API is called by the client to stop the table monitor. This has to be called to stop the table monitor which has been started by the call <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client.start_monitor" title="gpudb_table_monitor.GPUdbTableMonitor.Client.start_monitor"><code className="xref py py-meth docutils literal notranslate"><span className="pre">start\_monitor()</span></code></a>.</p>
                  <p>Failure to call this method will produce unpredictable results since the table monitors running in the background will not be stopped and cleaned up properly.</p>

                  <div className="admonition seealso">
                    <p className="admonition-title">See also</p>
                    <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client.start_monitor" title="gpudb_table_monitor.GPUdbTableMonitor.Client.start_monitor"><code className="xref py py-meth docutils literal notranslate"><span className="pre">start\_monitor()</span></code></a></p>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div className="dl py class">
            <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Options"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">Options</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">\_dict</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Encapsulates the various options used to create a table monitor. The class is initialized with sensible defaults which can be overridden by the users of the class. The following options are supported:</p>

              <ul className="simple">
                <li>
                  <div className="dl simple">
                    <div className="dt"><strong>inactivity\_timeout</strong></div>

                    <div className="dd">
                      <p>This option controls the time interval to set the timeout to determine when the program would do idle time processing like checking for the table existence, server HA failover, etc., if needed. It is specified in minutes as a float so that seconds can be accommodated as well. The default value is set to 20 minutes, which is converted internally to seconds.</p>
                    </div>
                  </div>
                </li>
              </ul>

              <p>Example usage:</p>

              <div className="highlight-default notranslate">
                ```
                options = GPUdbTableMonitor.Options(_dict=dict(
                    inactivity_timeout=0.1
                ))
                ```
              </div>

              <p>Constructor for <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a> class</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl simple">
                    <div className="dt">\_dict (<span className="em">dict</span>) –</div>

                    <div className="dd">
                      <p>Optional dictionary with options already loaded. Value can be None; if it is None suitable sensible defaults will be set internally.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <p><strong>Returns</strong></p>

              <blockquote>
                <div>
                  <p>A <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a> object.</p>
                </div>
              </blockquote>

              <div className="dl py method">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Options.default"> <span className="em property"><span className="k"><span className="pre">static</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">default</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>Create a default set of options for <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                  <p><strong>Returns</strong></p>

                  <blockquote>
                    <div>
                      <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a> instance</p>
                    </div>
                  </blockquote>
                </div>
              </div>

              <div className="dl py property">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Options.inactivity_timeout"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">inactivity\_timeout</span></span></div>

                <div className="dd">
                  <p>This is the getter for the property <cite>inactivity\_timeout</cite>. This is specified in minutes as a float so that seconds can be accommodated. This indicates a timeout interval after which if no notification is received from the server table monitors, the program will check whether everything is alright, like whether the table is still there and in the process will automatically trigger HA failover if needed.</p>
                  <p>The default value is set to 20 minutes converted to milliseconds.</p>
                  <p><strong>Returns</strong></p>

                  <blockquote>
                    <div>
                      <p>The value of the timeout as set in the –</p>
                      <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">GPUdbTableMonitor.Options</span></code></a> instance.</p>
                    </div>
                  </blockquote>
                </div>
              </div>

              <div className="dl py method">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Options.as_json"> <span className="sig-name descname"><span className="pre">as\_json</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>Return the options as a JSON</p>
                </div>
              </div>

              <div className="dl py method">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Options.as_dict"> <span className="sig-name descname"><span className="pre">as\_dict</span></span><span className="sig-paren">(</span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>Return the options as a dict</p>
                </div>
              </div>
            </div>
          </div>

          <div className="dl py class">
            <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">Callback</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">callback\_type</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">event\_callback</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">error\_callback</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">event\_options</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span><span className="sig-paren">)</span></div>

            <div className="dd">
              <p>Use this class to indicate which type of table monitor is desired.</p>
              <p>When the <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a> is constructed, a list of objects of this class has to be supplied to the constructor of the class.</p>
              <p>If the list of callbacks is empty or the list does not contain at least one of the callbacks of types (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.Type" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.Type</span></code></a>) <code className="docutils literal notranslate"><span className="pre">INSERT\_DECODED</span></code>, <code className="docutils literal notranslate"><span className="pre">INSERT\_RAW</span></code>, <code className="docutils literal notranslate"><span className="pre">DELETED</span></code>, or <code className="docutils literal notranslate"><span className="pre">UPDATED</span></code>, no table monitor would be created internally and the program would raise a <a className="reference internal" href="/content/api/python/source/gpudbexception#gpudb.GPUdbException" title="gpudb.GPUdbException"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdbException</span></code></a> and exit. So, a list of objects of this class is mandatory for the table monitor to function.</p>
              <p>An example of using this class and passing on to the constructor of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a> is as follows:</p>

              <div className="highlight-default notranslate">
                ```
                class GPUdbTableMonitorExample(GPUdbTableMonitor.Client):

                    def __init__(self, db, table_name, options=None):

                        # Create the list of callbacks objects which are to be passed to the
                        # GPUdbTableMonitor.Client class constructor

                        # This example shows only two callbacks being created so
                        # only an insert type table monitor will be created. For other
                        # types callback objects could be created similarly to receive
                        # notifications about other events.
                        callbacks = [
                            GPUdbTableMonitor.Callback(GPUdbTableMonitor.Callback.Type.INSERT_RAW,
                                                      self.on_insert_raw,
                                                      self.on_error),

                            GPUdbTableMonitor.Callback(GPUdbTableMonitor.Callback.Type.INSERT_DECODED,
                                                      self.on_insert_decoded,
                                                      self.on_error,
                                                      GPUdbTableMonitor.Callback.InsertDecodedOptions( GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode.ABORT ))

                        ]

                        # Invoke the base class constructor and pass in the list of callback
                        # objects created earlier.  This invocation is mandatory for the table
                        # monitor to be actually functional.
                        super(GPUdbTableMonitorExample, self).__init__(
                            db, table_name,
                            callbacks, options=options)
                ```
              </div>

              <p>Constructor for this class.</p>
              <p><strong>Parameters</strong></p>

              <blockquote>
                <div>
                  <div className="dl">
                    <div className="dt">callback\_type (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.Type" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.Type</span></code></a>) –</div>

                    <div className="dd">
                      <p>This indicates the type of the table monitor this callback will be used for. It must be of the type <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.Type" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.Type</span></code></a> enum.</p>
                    </div>

                    <div className="dt">event\_callback (<span className="em">method reference</span>) –</div>

                    <div className="dd">
                      <p>This is to be called for any event related to an operation on a table like insert, update, delete etc. As soon as such an event is observed this method will be called.</p>
                      <p>This method can have only one parameter. For each table monitor event (<cite>callback\_type</cite>), the parameter would be different. The method name has got no significance as long as the signature is as given below:</p>

                      <div className="highlight-default notranslate">
                        ```
                        def method_name(param):
                            # param - Could be a (dict|bytes|int|str)
                            # depending on the :attr:`callback_type`
                            # Processing Code follows ....
                        ```
                      </div>

                      <p>The method thus defined does not return anything.</p>
                      <p>The following table describes the parameter types which correspond to each of the <cite>callback\_type</cite>:</p>

                      <table className="docutils align-default">
                        <thead>
                          <tr className="row-odd">
                            <th className="head">
                              <p>NO</p>
                            </th>

                            <th className="head">
                              <p>callback\_type</p>
                            </th>

                            <th className="head">
                              <p>Parameter Type</p>
                            </th>
                          </tr>
                        </thead>

                        <tbody>
                          <tr className="row-even">
                            <td>
                              <p>1</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">INSERT\_DECODED</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">dict</span></code></p>
                            </td>
                          </tr>

                          <tr className="row-odd">
                            <td>
                              <p>2</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">INSERT\_RAW</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">bytes</span></code></p>
                            </td>
                          </tr>

                          <tr className="row-even">
                            <td>
                              <p>3</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">DELETED</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">int</span></code></p>
                            </td>
                          </tr>

                          <tr className="row-odd">
                            <td>
                              <p>4</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">UPDATED</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">int</span></code></p>
                            </td>
                          </tr>

                          <tr className="row-even">
                            <td>
                              <p>5</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">TABLE\_ALTERED</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">str</span></code></p>
                            </td>
                          </tr>

                          <tr className="row-odd">
                            <td>
                              <p>6</p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">TABLE\_DROPPED</span></code></p>
                            </td>

                            <td>
                              <p><code className="docutils literal notranslate"><span className="pre">str</span></code></p>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>

                    <div className="dt">error\_callback (<span className="em">method reference</span>) –</div>

                    <div className="dd">
                      <p>Optional parameter.</p>
                      <p>This will be called in case of any operational error that typically could manifest in the form of some exception (<a className="reference internal" href="/content/api/python/source/gpudbexception#gpudb.GPUdbException" title="gpudb.GPUdbException"><code className="xref py py-class docutils literal notranslate"><span className="pre">gpudb.GPUdbException</span></code></a>).</p>
                      <p>The name of the method does not matter. It must have only one argument of type <code className="docutils literal notranslate"><span className="pre">str</span></code>. The argument to this method will contain information related to the error that occurred; often details about any exception that was raised.</p>
                      <p>The signature of this method has to be:</p>

                      <div className="highlight-default notranslate">
                        ```
                        def method_name(param):
                            # param - str
                            # code here ...
                        ```
                      </div>
                    </div>

                    <div className="dt">event\_options (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.Options" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.Options"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.Options</span></code></a>) –</div>

                    <div className="dd">
                      <p>Optional parameter.</p>
                      <p>Options applicable to a specific callback type, e.g., insert, delete, update etc. Right now, the only option applicable is for the callback handling insertion of records where the record information is decoded and sent to the callback by the table monitor.</p>
                    </div>
                  </div>
                </div>
              </blockquote>

              <div className="dl py property">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.event_callback"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">event\_callback</span></span></div>

                <div className="dd">
                  <p>Get the method pointed to when an event is received</p>
                </div>
              </div>

              <div className="dl py property">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.error_callback"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">error\_callback</span></span></div>

                <div className="dd">
                  <p>Get the method pointed to when an error related to the <code className="xref py py-attr docutils literal notranslate"><span className="pre">callback\_type</span></code> of this class occurs.</p>
                </div>
              </div>

              <div className="dl py class">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Options"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">Options</span></span></div>

                <div className="dd">
                  <p>This class embodies the options for any given callback type. The <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a> constructor expects an instance of this class. However, instead of using this class directly, the user is supposed to use an instance of one of its derived classes. Each derived class is specialized with options that pertain to a certain type of callback.</p>
                  <p>Note that, currently, there is only one derived class as other callback types do not have special options at the moment.</p>

                  <div className="admonition seealso">
                    <p className="admonition-title">See also</p>
                    <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.InsertDecodedOptions</span></code></a></p>
                  </div>
                </div>
              </div>

              <div className="dl py class">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">InsertDecodedOptions</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">decode\_failure\_mode</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>Options used to control the behavior if an error occurs while receiving notifications about inserted records after decoding.</p>
                  <p>Constructor for this class.</p>
                  <p><strong>Parameters</strong></p>

                  <blockquote>
                    <div>
                      <div className="dl simple">
                        <div className="dt">decode\_failure\_mode (<a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode" title="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback.InsertDecodedOptions.DecodeFailureMode</span></code></a>) –</div>

                        <div className="dd">
                          <p>This is either <code className="docutils literal notranslate"><span className="pre">SKIP</span></code> or <code className="docutils literal notranslate"><span className="pre">ABORT</span></code> as described in the class documentation.</p>
                        </div>
                      </div>
                    </div>
                  </blockquote>

                  <div className="dl py property">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.decode_failure_mode"> <span className="em property"><span className="k"><span className="pre">property</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">decode\_failure\_mode</span></span></div>

                    <div className="dd">
                      <p>Get the decode failure mode value.</p>
                    </div>
                  </div>

                  <div className="dl py class">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">DecodeFailureMode</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">value</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">names</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">module</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">type</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">start</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">1</span></span></span><span className="sig-paren">)</span></div>

                    <div className="dd">
                      <p>This enum is used to identify the two possible modes to handle any error that can occur while decoding the payload received from the server table monitors. In both the cases (<code className="docutils literal notranslate"><span className="pre">SKIP</span></code> and <code className="docutils literal notranslate"><span className="pre">ABORT</span></code>) it will try to recover once by default.</p>

                      <div className="dl py attribute">
                        <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode.ABORT"> <span className="sig-name descname"><span className="pre">ABORT</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<DecodeFailureMode.ABORT:</span> <span className="pre">1></span></span></div>

                        <div className="dd">
                          <p>If a decoding error occurs and <code className="docutils literal notranslate"><span className="pre">ABORT</span></code> is specified, then the program aborts (quits with an exception)</p>

                          <div className="dl field-list simple">
                            <div className="dt field-odd">Type<span className="colon">:</span></div>

                            <div className="dd field-odd">
                              <p>int</p>
                            </div>
                          </div>
                        </div>
                      </div>

                      <div className="dl py attribute">
                        <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.InsertDecodedOptions.DecodeFailureMode.SKIP"> <span className="sig-name descname"><span className="pre">SKIP</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<DecodeFailureMode.SKIP:</span> <span className="pre">2></span></span></div>

                        <div className="dd">
                          <p>if <code className="docutils literal notranslate"><span className="pre">SKIP</span></code> is specified, then the program will skip to the next record and try to decode that. In <code className="docutils literal notranslate"><span className="pre">SKIP</span></code> mode, the record that has been skipped due to a problem in decoding will appear in the error log.</p>

                          <div className="dl field-list simple">
                            <div className="dt field-odd">Type<span className="colon">:</span></div>

                            <div className="dd field-odd">
                              <p>int</p>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>

              <div className="dl py class">
                <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type"> <span className="em property"><span className="k"><span className="pre">class</span></span><span className="w"> </span></span><span className="sig-name descname"><span className="pre">Type</span></span><span className="sig-paren">(</span><span className="em sig-param"><span className="n"><span className="pre">value</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">names</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">module</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">type</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">None</span></span></span>, <span className="em sig-param"><span className="n"><span className="pre">start</span></span><span className="o"><span className="pre">=</span></span><span className="default_value"><span className="pre">1</span></span></span><span className="sig-paren">)</span></div>

                <div className="dd">
                  <p>Indicates that the callback is for insert/update/delete event for the target table. The API will create a\[n] insert/update/delete table monitor, and per event, will invoke the appropriate event callback method. \[Optional based on context: “Upon receiving records that have been recently inserted into the target table, the table monitor will/will not decode the records and pass the binary/decoded records to the event callback method.”]</p>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.INSERT_DECODED"> <span className="sig-name descname"><span className="pre">INSERT\_DECODED</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.INSERT\_DECODED:</span> <span className="pre">1></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving records after decoding according to the table schema. This is used to create an insert monitor internally. The user will get the notification through the callback method pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>. The inserted records will be returned as a dict as an argument to the <cite>event\_callback</cite>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.INSERT_RAW"> <span className="sig-name descname"><span className="pre">INSERT\_RAW</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.INSERT\_RAW:</span> <span className="pre">2></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving records before decoding that is as raw bytes. This is used to create an insert monitor internally. The user will get the notification through the callback method pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>. The inserted records will be returned as bytes as an argument to the <cite>event\_callback</cite>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.DELETED"> <span className="sig-name descname"><span className="pre">DELETED</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.DELETED:</span> <span className="pre">3></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving notification about the count of deleted records. This is used to create a delete monitor internally. The user will get the notification through the callback method pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.UPDATED"> <span className="sig-name descname"><span className="pre">UPDATED</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.UPDATED:</span> <span className="pre">4></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving notification about the count of updated records. This is used to create an update monitor internally. The user will get the notification through the callback method pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.TABLE_ALTERED"> <span className="sig-name descname"><span className="pre">TABLE\_ALTERED</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.TABLE\_ALTERED:</span> <span className="pre">5></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving notification about the possible table alterations while one or more table monitors (insert, update, delete) are monitoring a table. If this is supplied then the user will be notified using the callback pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div className="dl py attribute">
                    <div className="dt sig sig-object py" id="gpudb_table_monitor.GPUdbTableMonitor.Callback.Type.TABLE_DROPPED"> <span className="sig-name descname"><span className="pre">TABLE\_DROPPED</span></span><span className="em property"><span className="w"> </span><span className="p"><span className="pre">=</span></span><span className="w"> </span><span className="pre">\<Type.TABLE\_DROPPED:</span> <span className="pre">6></span></span></div>

                    <div className="dd">
                      <p>This mode indicates an interest in receiving notification about the possible table deletions while one or more table monitors (insert, update, delete) are monitoring a table. If this is supplied then the user will be notified using the callback pointed to by the <cite>event\_callback</cite> property of <a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Callback" title="gpudb_table_monitor.GPUdbTableMonitor.Callback"><code className="xref py py-class docutils literal notranslate"><span className="pre">Callback</span></code></a>.</p>

                      <div className="admonition seealso">
                        <p className="admonition-title">See also</p>
                        <p><a className="reference internal" href="#gpudb_table_monitor.GPUdbTableMonitor.Client" title="gpudb_table_monitor.GPUdbTableMonitor.Client"><code className="xref py py-class docutils literal notranslate"><span className="pre">Client</span></code></a></p>
                      </div>

                      <div className="dl field-list simple">
                        <div className="dt field-odd">Type<span className="colon">:</span></div>

                        <div className="dd field-odd">
                          <p>int</p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
