Package com.taobao.metamorphosis.utils.Utils

Examples of com.taobao.metamorphosis.utils.Utils.Action


            this.logger.warn("û�пͻ�������,meta: " + sender.getServerUrl());
            return null;
        }

        final AtomicInteger connSum = new AtomicInteger(0);
        Utils.processEachLine(result, new Action() {

            @Override
            public void process(String line) {
                String[] tmp = StringUtils.split(line, " ");
                if (tmp != null && tmp.length == 2) {
View Full Code Here


    MsgSender msgSender = this.coreManager.getSender(serverUrl);
//    final String brokerId = partition.substring(0,partition.indexOf("-"));
        StatsResult ret = msgSender.getStats("offsets", 5000);
        if (ret.isSuccess()) {
          try {
                Utils.processEachLine(ret.getStatsInfo(), new Action() {
                  @Override
                    public void process(String line) {
                        String[] tmp = StringUtils.splitByWholeSeparator(line, " ");
                        if (tmp != null && tmp.length == 7) {
                            if(topic.equals(tmp[0])&&partitionId.equals(tmp[2])){
View Full Code Here

    @Test
    public void testProcessEachLine2() throws IOException {
        String realtimeStatsInfo =
                "result 200 150 2147483647\r\nSTATS\r\nrealtime_put null\r\nrealtime_get null\r\nrealtime_offset null\r\nrealtime_get_miss null\r\nrealtime_put_failed Count=1,Value=10,Value/Count=11,Count/Duration=,Duration=\r\nrealtime_message_size null\r\nEND";

        Utils.processEachLine(realtimeStatsInfo, new Action() {
            boolean finished = false;


            public boolean isFinished() {
                return finished;
View Full Code Here

    @Test
    public void testProcessEachLine3() throws IOException {
        String realtimeStatsInfo =
                "result 200 150 2147483647\nSTATS\r\nrealtime_put null\nrealtime_get null\nrealtime_offset null\nrealtime_get_miss null\nrealtime_put_failed Count=1,Value=,Value/Count=11,Count/Duration=,Duration=\nrealtime_message_size null\nEND";

        Utils.processEachLine(realtimeStatsInfo, new Action() {
            boolean finished = false;


            public boolean isFinished() {
                return finished;
View Full Code Here

        if (StringUtils.isBlank(statsResult.getStatsInfo())) {
            logger.warn("realtime stats info is blank");
            return;
        }

        Utils.processEachLine(statsResult.getStatsInfo(), new Action() {
            boolean finished = false;


            @Override
            public boolean isBreak() {
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.utils.Utils.Action

Copyright © 2018 www.massapicom. 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.