Examples of check()


Examples of com.alibaba.druid.wall.WallProvider.check()

                continue;
            }
//            if (i <= 121) {
//                continue;
//            }
            WallCheckResult result = provider.check(sql);
            if (result.getViolations().size() > 0) {
                Violation violation = result.getViolations().get(0);
                System.out.println("error (" + i + ") : " + violation.getMessage());
                System.out.println(sql);
                break;
View Full Code Here

Examples of com.alibaba.druid.wall.spi.MySqlWallProvider.check()

        config_callback.setTenantCallBack(new TenantTestCallBack());
       
        WallProvider.setTenantValue(123);
        MySqlWallProvider provider = new MySqlWallProvider(config);
        WallCheckResult checkResult = provider.check(sql);
        Assert.assertEquals(0, checkResult.getViolations().size());

        String resultSql = SQLUtils.toSQLString(checkResult.getStatementList(), JdbcConstants.MYSQL);
        Assert.assertEquals(expect_sql, resultSql);
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.status.StatusChecker.check()

            String[] ss = Constants.COMMA_SPLIT_PATTERN.split(status);
            for (String s : ss) {
                StatusChecker handler = extensionLoader.getExtension(s);
                Status stat;
                try {
                    stat = handler.check();
                } catch (Throwable t) {
                    stat = new Status(Status.Level.ERROR, t.getMessage());
                }
                statuses.put(s, stat);
            }
View Full Code Here

Examples of com.alibaba.jstorm.utils.IntervalCheck.check()

        LOG.warn(
            "Target server  {} is unavailable, pending {}, bufferSize {}, block sending {}ms",
            name, pendings.get(), cachedSize, delt);
      }

      if (timeoutIntervalCheck.check() == true) {
        if (messageBatchRef.get() != null) {
          LOG.warn(
              "Target server  {} is unavailable, wait too much time, throw timeout message",
              name);
          messageBatchRef.set(null);
View Full Code Here

Examples of com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor.check()

                for (int i = 0; i < 10; i++) {
                    if (!runningMonitor3.isStart()) {
                        runningMonitor3.start();
                    }
                    sleep(2000L + RandomUtils.nextInt(500));
                    if (runningMonitor3.check()) {
                        runningMonitor3.stop();
                    }
                    sleep(2000L + RandomUtils.nextInt(500));
                }
            }
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.check()

    }

    @Test
    public void testInit() {
        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
        boolean running = mainstemMonitor.check();
        want.bool(running).is(true);

        try {
            mainstemMonitor.waitForActive();
        } catch (InterruptedException e) {
View Full Code Here

Examples of com.alu.e3.data.IHealthCheckService.check()

   
    IHealthCheckService healthCheckService;
   
    healthCheckService = healthCheckFactory.getHealthCheckService(instanceType);
   
    return healthCheckService.check(node);
  }

  private boolean isAlreadyRegistered(Instance instance, List<Instance> list)
  {
    for (Instance i : list)
View Full Code Here

Examples of com.arjuna.ats.arjuna.coordinator.TransactionReaper.check()

    // test reaping
    reaper.insert(reapable, 1); // seconds
    reaper.insert(reapable2, 5);
                assertEquals(2, reaper.numberOfTransactions());
                assertEquals(2, reaper.numberOfTimeouts());
    reaper.check();
                assertEquals(2, reaper.numberOfTransactions());
    Thread.sleep(2*1000);
    reaper.check();
                assertEquals(1, reaper.numberOfTransactions());
                assertEquals(1, reaper.numberOfTimeouts());
View Full Code Here

Examples of com.asakusafw.runtime.stage.directio.StringTemplate.Format.check()

                            "Invalid format \"{1}\": {0}",
                            cursor,
                            argument == null ? "" : argument));
                }
                try {
                    format.check(property.getType(), argument);
                } catch (IllegalArgumentException e) {
                    cursor.rewind();
                    throw new IllegalArgumentException(MessageFormat.format(
                            "Invalid format \"{1}\": {0}",
                            cursor,
View Full Code Here

Examples of com.brewtab.irc.messages.filter.MessageFilter.check()

        for (Map.Entry<MessageListener, MessageFilter> entry : messageListeners.entrySet()) {
            final MessageListener listener = entry.getKey();
            final MessageFilter filter = entry.getValue();

            if (filter.check(message)) {
                executor.execute(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            listener.onMessage(message);
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.