Package com.asakusafw.bulkloader.common

Examples of com.asakusafw.bulkloader.common.StreamRedirectThread


            @Override
            public Void call() throws Exception {
                LOG.info("TG-EXTRACTOR-12003", subcommand, info.getId(), info.getTableName());
                Process process = builder.start();
                try {
                    Thread stdout = new StreamRedirectThread(process.getInputStream(), System.out);
                    stdout.setDaemon(true);
                    stdout.start();
                    Thread stderr = new StreamRedirectThread(process.getErrorStream(), System.err);
                    stderr.setDaemon(true);
                    stderr.start();
                    stdout.join();
                    stderr.join();
                    int exitCode = process.waitFor();
                    if (exitCode != 0) {
                        throw new IOException(MessageFormat.format(
                                "Cache builder returns unexpected exit code: {0}",
                                exitCode));
View Full Code Here


            throw new IllegalArgumentException("in must not be null"); //$NON-NLS-1$
        }
        if (out == null) {
            throw new IllegalArgumentException("out must not be null"); //$NON-NLS-1$
        }
        Thread t = new StreamRedirectThread(in, out);
        t.setDaemon(true);
        t.start();
        synchronized (running) {
            running.add(t);
        }
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.bulkloader.common.StreamRedirectThread

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.