zoukankan      html  css  js  c++  java
  • task

    package com.hgx.test.process;

    import com.hgx.test.common.GetProperties;

    /**
    * config file read
    * 报名
    * @author sasou <admin@php-gene.com> web:http://www.php-gene.com/
    * @version 1.0.0
    */
    public final class task {

    public static void main(String[] args) {
    // init
    new GetProperties();
    if (GetProperties.canal.destination == null) {
    System.out.println("error:canal destination is null!");
    return;
    }
    int num = GetProperties.canal.destination.length;

    if (num > 0) {
    for (int i = 0; i < num; i++) {
    System.out.println(GetProperties.canal.destination[i]);
    System.out.println(GetProperties.canal.ip);
    if (!"".equals(GetProperties.canal.destination[i])) {
    String type = GetProperties.target.get(GetProperties.canal.destination[i]).type;
    switch (type) {
    case "kafka":
    new Thread(new Kafkatest(GetProperties.canal.destination[i])).start();
    break;
    /* case "redis":
    new Thread(new Redis(GetProperties.canal.destination[i])).start();
    break;
    case "elasticsearch":
    new Thread(new ElasticSearch(GetProperties.canal.destination[i])).start();
    break;*/
    default:
    System.out.println("error:not support type!");
    break;
    }

    }
    }
    }
    }

    }
  • 相关阅读:
    构造和析构
    const修饰的成员函数
    class和struct权限
    封装加强
    函数重载实现原理
    Unity2019破解hub
    Lua模拟stack
    函数重载
    LeanTween
    占位参数和默认参数
  • 原文地址:https://www.cnblogs.com/heguoxiu/p/10135364.html
Copyright © 2011-2022 走看看