Package org.apache.camel.component.zookeeper

Examples of org.apache.camel.component.zookeeper.ZooKeeperEndpoint


    private ZooKeeperEndpoint createCandidateNode(CamelContext camelContext) {
        this.template = camelContext.createProducerTemplate();
        if (log.isInfoEnabled()) {
            log.info(format("Initializing ZookeeperRoutePolicy with uri '%s'", uri));
        }
        ZooKeeperEndpoint zep = camelContext.getEndpoint(uri, ZooKeeperEndpoint.class);
        zep.getConfiguration().setCreate(true);
        String fullpath = createFullPathToCandidate(zep);
        Exchange e = zep.createExchange();
        e.setPattern(ExchangePattern.InOut);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_NODE, fullpath);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_CREATE_MODE, CreateMode.EPHEMERAL_SEQUENTIAL);
        template.send(zep, e);
View Full Code Here


        }
    }

    private ZooKeeperEndpoint createCandidateNode(CamelContext camelContext) {
        LOG.info("Initializing ZookeeperElection with uri '{}'", uri);
        ZooKeeperEndpoint zep = camelContext.getEndpoint(uri, ZooKeeperEndpoint.class);
        zep.getConfiguration().setCreate(true);
        String fullpath = createFullPathToCandidate(zep);
        Exchange e = zep.createExchange();
        e.setPattern(ExchangePattern.InOut);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_NODE, fullpath);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_CREATE_MODE, CreateMode.EPHEMERAL_SEQUENTIAL);
        producerTemplate.send(zep, e);
View Full Code Here

    private ZooKeeperEndpoint createCandidateNode(CamelContext camelContext) {
        this.template = camelContext.createProducerTemplate();
        if (log.isInfoEnabled()) {
            log.info(format("Initializing ZookeeperRoutePolicy with uri '%s'", uri));
        }
        ZooKeeperEndpoint zep = (ZooKeeperEndpoint)camelContext.getEndpoint(uri);
        zep.getConfiguration().setCreate(true);
        String fullpath = createFullPathToCandidate(zep);
        Exchange e = zep.createExchange();
        e.setPattern(ExchangePattern.InOut);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_NODE, fullpath);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_CREATE_MODE, CreateMode.EPHEMERAL_SEQUENTIAL);
        template.send(zep, e);
View Full Code Here

    private ZooKeeperEndpoint createCandidateNode(CamelContext camelContext) {
        this.template = camelContext.createProducerTemplate();
        if (log.isInfoEnabled()) {
            log.info(format("Initializing ZookeeperRoutePolicy with uri '%s'", uri));
        }
        ZooKeeperEndpoint zep = camelContext.getEndpoint(uri, ZooKeeperEndpoint.class);
        zep.getConfiguration().setCreate(true);
        String fullpath = createFullPathToCandidate(zep);
        Exchange e = zep.createExchange();
        e.setPattern(ExchangePattern.InOut);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_NODE, fullpath);
        e.getIn().setHeader(ZooKeeperMessage.ZOOKEEPER_CREATE_MODE, CreateMode.EPHEMERAL_SEQUENTIAL);
        template.send(zep, e);
View Full Code Here

TOP

Related Classes of org.apache.camel.component.zookeeper.ZooKeeperEndpoint

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.