Examples of counter()


Examples of com.codahale.metrics.MetricRegistry.counter()

    public ScriptServer(final RexsterApplication rexsterApplication) {
        this.rexsterApplication = rexsterApplication;

        final MetricRegistry metricRegistry = this.rexsterApplication.getMetricRegistry();
        this.scriptTimer = metricRegistry.timer(MetricRegistry.name("rexpro", "script-engine"));
        this.successfulExecutions = metricRegistry.counter(MetricRegistry.name("rexpro", "script-engine", "success"));
        this.failedExecutions = metricRegistry.counter(MetricRegistry.name("rexpro", "script-engine", "fail"));
    }
    public void handleRequest(ScriptRequestMessage message, RexProRequest request) throws IOException {

        try {
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.counter()

        this.rexsterApplication = rexsterApplication;

        final MetricRegistry metricRegistry = this.rexsterApplication.getMetricRegistry();
        this.scriptTimer = metricRegistry.timer(MetricRegistry.name("rexpro", "script-engine"));
        this.successfulExecutions = metricRegistry.counter(MetricRegistry.name("rexpro", "script-engine", "success"));
        this.failedExecutions = metricRegistry.counter(MetricRegistry.name("rexpro", "script-engine", "fail"));
    }
    public void handleRequest(ScriptRequestMessage message, RexProRequest request) throws IOException {

        try {
            final AbstractRexProSession session;
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.counter()

                                                      final Graph graph, final Vertex vertex, final Edge edge,
                                                      final String script) {

        final MetricRegistry metricRegistry = rexsterResourceContext.getMetricRegistry();
        final Timer scriptTimer = metricRegistry.timer(MetricRegistry.name("http", "script-engine"));
        final Counter successfulExecutions = metricRegistry.counter(MetricRegistry.name("http", "script-engine", "success"));
        final Counter failedExecutions = metricRegistry.counter(MetricRegistry.name("http", "script-engine", "fail"));

        ExtensionResponse extensionResponse;

        final JSONObject requestObject = rexsterResourceContext.getRequestObject();
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.counter()

                                                      final String script) {

        final MetricRegistry metricRegistry = rexsterResourceContext.getMetricRegistry();
        final Timer scriptTimer = metricRegistry.timer(MetricRegistry.name("http", "script-engine"));
        final Counter successfulExecutions = metricRegistry.counter(MetricRegistry.name("http", "script-engine", "success"));
        final Counter failedExecutions = metricRegistry.counter(MetricRegistry.name("http", "script-engine", "fail"));

        ExtensionResponse extensionResponse;

        final JSONObject requestObject = rexsterResourceContext.getRequestObject();
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.counter()

            metersByStatusCode.put(entry.getKey(),
                    metricsRegistry.meter(name(WebappMetricsFilter.class, entry.getValue())));
        }
        this.otherMeter = metricsRegistry.meter(name(WebappMetricsFilter.class,
                                                     otherMetricName));
        this.activeRequests = metricsRegistry.counter(name(WebappMetricsFilter.class,
                                                           "activeRequests"));
        this.requestTimer = metricsRegistry.timer(name(WebappMetricsFilter.class,
                                                       "requests"));

    }
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.counter()

            metersByStatusCode.put(entry.getKey(),
                    metricsRegistry.meter(name(AbstractInstrumentedFilter.class, entry.getValue())));
        }
        this.otherMeter = metricsRegistry.meter(name(AbstractInstrumentedFilter.class,
                                                     otherMetricName));
        this.activeRequests = metricsRegistry.counter(name(AbstractInstrumentedFilter.class,
                                                           "activeRequests"));
        this.requestTimer = metricsRegistry.timer(name(AbstractInstrumentedFilter.class,
                                                       "requests"));

    }
View Full Code Here

Examples of mage.game.stack.Spell.counter()

            Player player = game.getPlayer(spell.getControllerId());
            String message = "Have Molten Influence do 4 damage to you?";
            if (player.chooseUse(Outcome.Damage, message, game)) {
                player.damage(4, source.getSourceId(), game, false, true);
            } else {
                spell.counter(source.getSourceId(), game);
            }
        }
        return false;
    }
}
View Full Code Here

Examples of mage.game.stack.StackObject.counter()

                    MageObject card = game.getObject(stackObject.getSourceId());
                    if (card instanceof Card) {
                        ((Card) card).putOntoBattlefield(game, Zone.STACK, source.getSourceId(), source.getControllerId());
                    }
                } else {
                    stackObject.counter(sourceId, game);
                }
                game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId()));
                return true;
            }
        }
View Full Code Here

Examples of mage.game.stack.StackObject.counter()

                effect.setTargetPointer(new FixedTarget(stackObject.getId()));
                game.addEffect(effect, source);
                // Spell Crumple specific code end
                game.informPlayers(new StringBuilder(stackObject.getName()).append(" is countered by ").append(sourceObject.getLogName()).toString());
                game.getStack().remove(stackObject);
                stackObject.counter(sourceId, game); // tries to move to graveyard               
                game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId()));
            } else {
                game.informPlayers(new StringBuilder(stackObject.getName()).append(" could not be countered by ").append(sourceObject.getLogName()).toString());
            }
            return true;
View Full Code Here

Examples of mage.game.stack.StackObject.counter()

                effect.setTargetPointer(new FixedTarget(stackObject.getId()));
                game.addEffect(effect, source);
                // Hinder specific code end
                game.informPlayers(new StringBuilder(stackObject.getName()).append(" is countered by ").append(sourceObject.getLogName()).toString());
                game.getStack().remove(stackObject);
                stackObject.counter(sourceId, game); // tries to move to graveyard               
                game.fireEvent(GameEvent.getEvent(GameEvent.EventType.COUNTERED, objectId, sourceId, stackObject.getControllerId()));
            } else {
                game.informPlayers(new StringBuilder(stackObject.getName()).append(" could not be countered by ").append(sourceObject.getLogName()).toString());
            }
            return true;
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.