Examples of Monitor


Examples of avrora.monitors.Monitor

            Simulation.Node n = (Simulation.Node)i.next();
            Iterator im = n.getMonitors().iterator();
            if ( im.hasNext() )
                TermUtil.printSeparator(Terminal.MAXLINE, "Monitors for node "+n.id);
            while ( im.hasNext() ) {
                Monitor m = (Monitor)im.next();
                m.report();
            }
        }
    }
View Full Code Here

Examples of com.alibaba.dubbo.monitor.Monitor

            int concurrent = getConcurrent(invoker, invocation).get(); // 当前并发数
            String application = invoker.getUrl().getParameter(Constants.APPLICATION_KEY);
            String service = invoker.getInterface().getName(); // 获取服务名称
            String method = invocation.getMethodName(); // 获取方法名
            URL url = invoker.getUrl().getUrlParameter(Constants.MONITOR_KEY);
            Monitor monitor = monitorFactory.getMonitor(url);
            int localPort;
            String remoteKey;
            String remoteValue;
            if ("consumer".equals(invoker.getUrl().getParameter("side"))) {
                // ---- 服务消费方监控 ----
                context = RpcContext.getContext(); // 消费方必须在invoke()之后获取context信息
                localPort = 0;
                remoteKey = MonitorService.PROVIDER;
                remoteValue = invoker.getUrl().getAddress();
            } else {
                // ---- 服务提供方监控 ----
                localPort = invoker.getUrl().getPort();
                remoteKey = MonitorService.CONSUMER;
                remoteValue = context.getRemoteHost();
            }
            monitor.count(new URL(Constants.COUNT_PROTOCOL,
                    NetUtils.getLocalHost(), localPort,
                    service + "/" + method,
                    MonitorService.APPLICATION, application,
                    MonitorService.INTERFACE, service,
                    MonitorService.METHOD, method,
View Full Code Here

Examples of com.betfair.tornjak.monitor.Monitor

    public Object monitorMethod(final ProceedingJoinPoint pjp) throws Throwable {

        final MonitorMethod annotation = getAnnotation(pjp);

        Monitor monitor = monitorRegistry.getMonitor(annotation.monitorName());
        if (monitor == null) {
            throw new IllegalArgumentException("The monitor named " + annotation.monitorName() + " is not defined.");
        }
        if (!(monitor instanceof PassiveMethodMonitor)) {
            throw new IllegalArgumentException("The monitor named " + annotation.monitorName() + " is not a method monitor (passive or active).");
View Full Code Here

Examples of com.btmatthews.utils.monitor.Monitor

     * Create the monitor object tha is used to control a server.
     *
     * @return A {@link Monitor} object.
     */
    public Monitor createMonitor() {
        return new Monitor(monitorKey, monitorPort, monitorRetryCount, monitorRetryInterval);
    }
View Full Code Here

Examples of com.google.common.util.concurrent.Monitor

        stringLocks = CacheBuilder.newBuilder().build(new LockCacheLoader());
    }


    public void lock(Object name) {
        Monitor lock;
        synchronized (stringLocks) {
            lock = stringLocks.getUnchecked(name);
        }
        lock.enter();
    }
View Full Code Here

Examples of com.jamonapi.Monitor

   * @see com.jamonapi.MonitorFactory#start
   * @see com.jamonapi.Monitor#stop
   */
  protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable {
    String name = createInvocationTraceName(invocation);
    Monitor monitor = MonitorFactory.start(name);
    try {
      return invocation.proceed();
    }
    finally {
      monitor.stop();
      if (!this.trackAllInvocations || isLogEnabled(logger)) {
        logger.trace("JAMon performance statistics for method [" + name + "]:\n" + monitor);
      }
    }
  }
View Full Code Here

Examples of com.metamx.metrics.Monitor

  )
  {
    List<Monitor> monitors = Lists.newArrayList();

    for (Class<? extends Monitor> monitorClass : Iterables.concat(monitorsConfig.getMonitors(), monitorSet)) {
      final Monitor monitor = injector.getInstance(monitorClass);

      log.info("Adding monitor[%s]", monitor);

      monitors.add(monitor);
    }
View Full Code Here

Examples of com.proofpoint.configuration.Problems.Monitor

                isValid = false;
            }
            else {
                final Class<?> valueClass = (Class<?>) mapTypes[1];
                if (isConfigClass(valueClass)) {
                    getConfigurationMetadata(valueClass, new Monitor()
                    {
                        @Override
                        public void onError(Message errorMessage)
                        {
                            problems.addError(errorMessage.getCause(),
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.Monitor

        WorkflowCreator creator = new WorkflowCreator();
        Workflow workflow = creator.createComplexMathWorkflow();
        WorkflowClient.createScript(workflow);

        Monitor monitor;
        if (this.gui) {
            this.engine = new XBayaEngine(this.configuration);
            this.graphCanvas = this.engine.getGUI().getGraphCanvas();
            this.graphCanvas.setWorkflow(workflow);
            monitor = this.engine.getMonitor();
            this.engine.getGUI().eventReceived(new Event(Type.MONITOR_STARTED));
            repaintAndWait(2);
        } else {
            MonitorConfiguration monitorConfiguration = new MonitorConfiguration(
                    this.configuration.getBrokerURL(), this.configuration
                            .getTopic(), this.configuration.isPullMode(),
                    this.configuration.getMessageBoxURL());
            monitor = new Monitor(monitorConfiguration);
        }

        MonitorEventData eventData = monitor.getEventData();
        MonitorCallback callback = new MonitorCallback(eventData);
        LoopbackPublisher publisher = new LoopbackPublisher(callback,
                this.configuration.getTopic());
        MonitorNotifier notifier = new MonitorNotifier(publisher);
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.fsobject.actor.Monitor

                            } else if (name.equals(ParsingUtil.TIMEBASE)) {
                                currentObject = new TimeBase(currentSection);
                            } else if (name.equals(ParsingUtil.HOOK)) {
                                currentObject = new Hook(currentSection);
                            } else if (name.equals(ParsingUtil.MONITOR)) {
                                currentObject = new Monitor(currentSection);
                            } else if (name.startsWith(ParsingUtil.CONSTRAINT)) {
                                // Hierarchical constraint case processing
                                currentObject = new HierarchicalConstraint(currentSection);
                                String[] parts = name.split("/");
                                if (parts.length == 3) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.