Sets the monitor configuration callback.

    Wrapper for:
        GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun cbfun);
559277
def set_monitor_callback(cbfun):
    
    global _monitor_callback
    previous_callback = _monitor_callback
    if cbfun is None:
        cbfun = 0
    c_cbfun = _GLFWmonitorfun(cbfun)
    _monitor_callback = (cbfun, c_cbfun)
    cbfun = c_cbfun
    _glfw.glfwSetMonitorCallback(cbfun)
    if previous_callback is not None and previous_callback[0] != 0:
        return previous_callback[0]
1184361
def _pfp__set_watch(self, watch_fields, update_func, *func_call_info):
        """"""
        self._pfp__watch_fields = watch_fields

        for watch_field in watch_fields:
            watch_field._pfp__watch(self)
        self._pfp__update_func = update_func
        self._pfp__update_func_call_info = func_call_info
757983
def configure(self, options, conf):
        """"""
        super(FlakyPlugin, self).configure(options, conf)
        if not self.enabled:
            return
        is_multiprocess = int(getattr(options, 'multiprocess_workers', 0)) > 0
        self._stream = self._get_stream(is_multiprocess)
        self._flaky_result = TextTestResult(self._stream, [], 0)
        self._flaky_report = options.flaky_report
        self._flaky_success_report = options.flaky_success_report
        self._force_flaky = options.force_flaky
        self._max_runs = options.max_runs
        self._min_passes = options.min_passes
1004607
def set_alert_callback(self, callback):
        
        if callable(callable):
            self.http.alert_callback = functools.partial(callback, self)
        else:
            self.http.alert_callback = None
863311
def set_monitor(module):
    
    def monitor(name, tensor,
                track_data=True,
                track_grad=True):
        """
        Register the tensor under the name given (now a string)
        and track it based on the track_data and track_grad arguments.
        """
        module.monitored_vars[name] = {
            'tensor':tensor,
            'track_data':track_data,
            'track_grad':track_grad,
        }
    module.monitor = monitor
914463
def configure(self, options, conf):
        
        super(LeakDetectorPlugin, self).configure(options, conf)
        if options.leak_detector_level:
            self.reporting_level = int(options.leak_detector_level)
        self.report_delta = options.leak_detector_report_delta
        self.patch_mock = options.leak_detector_patch_mock
        self.ignore_patterns = options.leak_detector_ignore_patterns
        self.save_traceback = options.leak_detector_save_traceback
        self.multiprocessing_enabled = bool(getattr(options, 'multiprocess_workers', False))
413152
protected void updatedMonitor(ServiceReference<FileMonitor> monitorRef) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "CoreServiceImpl updatedMonitor", monitorRef);
        MonitorHolder existing = fileMonitors.get(monitorRef);
        if (existing == null)
            return;

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "CoreServiceImpl updatedMonitor, existing found");
        // Only initialize and start the monitor if the component has been activated
        if (cContext != null) {
            try {
                // Create a root cache location for the bundle that registered this service;
                // there could be multiple monitors associated with a bundle, but all should be destroyed
                // if/when the bundle is uninstalled, so keep them "together"..
                //TODO n.b. cacheRoot is unused
                File cacheRoot = cContext.getBundleContext().getDataFile(Long.toString(monitorRef.getBundle().getBundleId()));
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "CoreServiceImpl updatedMonitor, about to refresh");
                existing.refresh(cacheRoot);
            } catch (RuntimeException re) {
                // Generated FFDC, rethrow to fail the bind
                fileMonitors.remove(monitorRef);
                throw re;
            }
        }
    }
325521
def get_monitor() -> Optional[resource_pb2_grpc.ResourceMonitorStub]:
    
    monitor = SETTINGS.monitor
    if not monitor:
        require_test_mode_enabled()
    return monitor
600422
def tracer_config(__init__, app, args, kwargs):
    
    __init__(*args, **kwargs)

    tracing = app.settings.get('opentracing_tracing')
    tracer_callable = app.settings.get('opentracing_tracer_callable')
    tracer_parameters = app.settings.get('opentracing_tracer_parameters', {})

    if tracer_callable is not None:
        if not callable(tracer_callable):
            tracer_callable = _get_callable_from_name(tracer_callable)

        tracer = tracer_callable(**tracer_parameters)
        tracing = TornadoTracing(tracer)

    if tracing is None:
        tracing = TornadoTracing()  # fallback to the global tracer

    app.settings['opentracing_tracing'] = tracing

    tracing._trace_all = app.settings.get('opentracing_trace_all',
                                          DEFAULT_TRACE_ALL)
    tracing._trace_client = app.settings.get('opentracing_trace_client',
                                             DEFAULT_TRACE_CLIENT)
    tracing._start_span_cb = app.settings.get('opentracing_start_span_cb',
                                              None)

    httpclient._set_tracing_enabled(tracing._trace_client)
    if tracing._trace_client:
        httpclient._set_tracing_info(tracing._tracer_obj,
                                     tracing._start_span_cb)
105998
def loadMonitors(self, callback=None, errback=None, **kwargs):
        
        import ns1.monitoring
        monitors_list = self.monitors().list(callback, errback)

        return [ns1.monitoring.Monitor(self.config, m) for m in monitors_list]
11352
public static void reconfigureMonitor(MonitoringPluginConfig config) {
        for (GenericMonitor monitor : MONITORS) {
            if (monitor.config == config) {
                monitor.stop();
                monitor.setup();
            }
        }
    }
622413
def set_infra_led_config(self, mode, callback=None):
        '''
        
        '''
        params = {'mode': mode}
        return self.execute_command('setInfraLedConfig', params, callback=callback)
586982
function _gpfRequireConfigure (options) {
    _gpfRequireConfigureCheckOptions(options);
    var me = this;
    _gpfArrayForEach(_gpfRequireConfigureOptionNames.filter(function (name) {
        return options[name] !== undefined;
    }), function (name) {
        _gpfRequireConfigureHandler[name](me, options[name]);
    });
}
562504
def set_window_refresh_callback(window, cbfun):
    
    window_addr = ctypes.cast(ctypes.pointer(window),
                              ctypes.POINTER(ctypes.c_long)).contents.value
    if window_addr in _window_refresh_callback_repository:
        previous_callback = _window_refresh_callback_repository[window_addr]
    else:
        previous_callback = None
    if cbfun is None:
        cbfun = 0
    c_cbfun = _GLFWwindowrefreshfun(cbfun)
    _window_refresh_callback_repository[window_addr] = (cbfun, c_cbfun)
    cbfun = c_cbfun
    _glfw.glfwSetWindowRefreshCallback(window, cbfun)
    if previous_callback is not None and previous_callback[0] != 0:
        return previous_callback[0]
610779
def set_receive_callback(self, callback, *args, **kwargs):
        """"""
        self.data_callback = callback
        self.data_callback_kwargs = kwargs
824974
def setup(self):
        '''
        
        '''
        if self.controller:
            self.controller.setup()
        for monitor in self.monitors:
            monitor.setup()
330930
def set_window_size_callback(window, cbfun):
    
    window_addr = ctypes.cast(ctypes.pointer(window),
                              ctypes.POINTER(ctypes.c_long)).contents.value
    if window_addr in _window_size_callback_repository:
        previous_callback = _window_size_callback_repository[window_addr]
    else:
        previous_callback = None
    if cbfun is None:
        cbfun = 0
    c_cbfun = _GLFWwindowsizefun(cbfun)
    _window_size_callback_repository[window_addr] = (cbfun, c_cbfun)
    cbfun = c_cbfun
    _glfw.glfwSetWindowSizeCallback(window, cbfun)
    if previous_callback is not None and previous_callback[0] != 0:
        return previous_callback[0]