Package org.apache.camel.builder

Examples of org.apache.camel.builder.NotifyBuilder.matches()


        // start the route
        StopWatch watch = new StopWatch();
        context.startRoute("foo");

        LOG.info("Waiting to process all the files");
        boolean matches = notify.matches(3, TimeUnit.MINUTES);
        LOG.info("Should process all files " + matches);

        LOG.info("Time taken " + watch.taken() + " ms");
    }
View Full Code Here


    @Test
    public void testXPathSTaXPerformanceRoute() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenDone(size).create();

        boolean matches = notify.matches(60, TimeUnit.SECONDS);
        log.info("Processed file with " + size + " elements in: " + TimeUtils.printDuration(watch.stop()));

        log.info("Processed " + tiny.get() + " tiny messages");
        log.info("Processed " + small.get() + " small messages");
        log.info("Processed " + med.get() + " medium messages");
View Full Code Here

        NotifyBuilder notify = new NotifyBuilder(context).whenExactlyDone(1).create();

        LOG.debug("------------Beginning CacheProducer Add Test---------------");
        sendOriginalFile();

        notify.matches(10, TimeUnit.SECONDS);
        assertNotNull(fetchElement("10"));
    }

    @Test
    public void testAddingDataElementEternal() throws Exception {
View Full Code Here

    @Test
    @Ignore("Manual test")
    public void testXPathPerformanceRoute() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenDone(size).create();

        boolean matches = notify.matches(60, TimeUnit.SECONDS);
        log.info("Processed file with " + size + " elements in: " + TimeUtils.printDuration(watch.stop()));

        log.info("Processed " + tiny.get() + " tiny messages");
        log.info("Processed " + small.get() + " small messages");
        log.info("Processed " + med.get() + " medium messages");
View Full Code Here

    }

    public void xxxtestTokenPairPerformanceRoute() throws Exception {
        NotifyBuilder notify = new NotifyBuilder(context).whenDone(size).create();

        boolean matches = notify.matches(5, TimeUnit.MINUTES);
        log.info("Processed file with " + size + " elements in: " + TimeUtils.printDuration(watch.stop()));

        log.info("Processed " + tiny.get() + " tiny messages");
        log.info("Processed " + small.get() + " small messages");
        log.info("Processed " + med.get() + " medium messages");
View Full Code Here

        // start the route
        StopWatch watch = new StopWatch();
        context.startRoute("foo");

        LOG.info("Waiting to process all the files");
        boolean matches = notify.matches(3, TimeUnit.MINUTES);
        LOG.info("Should process all files " + matches);

        LOG.info("Time taken " + watch.taken() + " ms");
    }
View Full Code Here

                }
            });
        }

        log.info("Waiting to process {} messages...", size);
        assertTrue(builder.matches(60, TimeUnit.SECONDS));

        long delta = watch.stop();
        log.info("Took {} millis", delta);

        // just sleep a bit before shutting down
View Full Code Here

        template.sendBody("seda:start", "B");

        assertMockEndpointsSatisfied();

        // wait for all exchanges to be done (2 input + 1 aggregated)
        notify.matches(5, TimeUnit.SECONDS);

        // should have confirmed
        assertTrue("Should have confirmed", myRepo.isConfirm());
    }
View Full Code Here

    // disabled due manual test
    public void xxxtestSplitParallelBigFile() throws Exception {
        StopWatch watch = new StopWatch();

        NotifyBuilder builder = new NotifyBuilder(context).whenDone(lines + 1).create();
        boolean done = builder.matches(120, TimeUnit.SECONDS);

        log.info("Took " + TimeUtils.printDuration(watch.stop()));

        if (!done) {
            throw new CamelException("Could not split file in 2 minutes");
View Full Code Here

                }
            });
            responses.put(index, out);
        }

        notify.matches(2, TimeUnit.MINUTES);
        log.info("Took " + watch.taken() + " millis to process " + files + " messages using " + poolSize + " client threads.");
        assertEquals(files, responses.size());

        // get all responses
        Set<Object> unique = new HashSet<Object>();
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.