Package org.jgroups.stack

Examples of org.jgroups.stack.AddressGenerator


            throw new IllegalArgumentException("\"site\" must be set");
        timer=getTransport().getTimer();
        JChannel channel=getProtocolStack().getChannel();
        if(channel == null)
            throw new IllegalStateException("channel must be set");
        channel.setAddressGenerator(new AddressGenerator() {
            public Address generateAddress() {
                return PayloadUUID.randomUUID(site);
            }
        });
    }
View Full Code Here


      // if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups
      if (transportCfg.hasTopologyInfo()) {
         // We can do this only if the channel hasn't been started already
         if (startChannel) {
            ((JChannel) channel).setAddressGenerator(new AddressGenerator() {
               @Override
               public org.jgroups.Address generateAddress() {
                  return TopologyUUID.randomUUID(channel.getName(),
                        transportCfg.siteId(), transportCfg.rackId(),
                        transportCfg.machineId());
View Full Code Here

      channel.setOpt(Channel.LOCAL, false);

      // if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups:
      if(configuration.hasTopologyInfo()) {
         ((JChannel)channel).setAddressGenerator(new AddressGenerator() {

            public org.jgroups.Address generateAddress() {
               return TopologyUUID.randomUUID(channel.getName(),
                     configuration.getSiteId(), configuration.getRackId(), configuration.getMachineId());
View Full Code Here

      // if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups
      if (transportCfg.hasTopologyInfo()) {
         // We can do this only if the channel hasn't been started already
         if (startChannel) {
            ((JChannel) channel).setAddressGenerator(new AddressGenerator() {
               @Override
               public org.jgroups.Address generateAddress() {
                  return TopologyUUID.randomUUID(channel.getName(),
                        transportCfg.siteId(), transportCfg.rackId(),
                        transportCfg.machineId());
View Full Code Here

      channel.setOpt(Channel.LOCAL, false);

      // if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups:
      if(configuration.hasTopologyInfo()) {
         ((JChannel)channel).setAddressGenerator(new AddressGenerator() {

            public org.jgroups.Address generateAddress() {
               return TopologyUUID.randomUUID(channel.getName(),
                     configuration.getSiteId(), configuration.getRackId(), configuration.getMachineId());
View Full Code Here

      // if we have a TopologyAwareConsistentHash, we need to set our own address generator in JGroups
      if (transportCfg.hasTopologyInfo()) {
         // We can do this only if the channel hasn't been started already
         if (connectChannel) {
            ((JChannel) channel).setAddressGenerator(new AddressGenerator() {
               @Override
               public org.jgroups.Address generateAddress() {
                  return TopologyUUID.randomUUID(channel.getName(),
                        transportCfg.siteId(), transportCfg.rackId(),
                        transportCfg.machineId());
View Full Code Here

            throw new IllegalArgumentException("\"site\" must be set");
        timer=getTransport().getTimer();
        JChannel channel=getProtocolStack().getChannel();
        if(channel == null)
            throw new IllegalStateException("channel must be set");
        channel.addAddressGenerator(new AddressGenerator() {
            public Address generateAddress() {
                return ExtendedUUID.randomUUID().put(SITE_ID, Util.stringToBytes(site));
            }
        });
    }
View Full Code Here

            log.warn(local_addr + ": " + FORWARD_TO_COORD.class.getSimpleName() + " protocol not found below; " +
                       "unable to re-submit messages to the new coordinator if the current coordinator crashes");

        if(enable_address_tagging) {
            JChannel ch=getProtocolStack().getChannel();
            ch.addAddressGenerator(new AddressGenerator() {
                public Address generateAddress() {
                    ExtendedUUID retval=ExtendedUUID.randomUUID();
                    if(can_become_site_master)
                        retval.setFlag(ExtendedUUID.can_become_site_master);
                    return retval;
View Full Code Here

            return;
        }
        try {
            for(RelayConfig.BridgeConfig bridge_config: bridge_configs) {
                Bridge bridge=new Bridge(bridge_config.createChannel(), bridge_config.getClusterName(), bridge_name,
                                         new AddressGenerator() {
                                             public Address generateAddress() {
                                                 UUID uuid=UUID.randomUUID();
                                                 return new SiteUUID(uuid, null, my_site_id);
                                             }
                                         });
View Full Code Here

        String           group_name=null;
        long             state_timeout=5000;
        boolean          use_unicasts=false;
        String           name=null;
        boolean          send_own_state_on_merge=true;
        AddressGenerator generator=null;

        for(int i=0; i < args.length; i++) {
            if("-help".equals(args[i])) {
                help();
                return;
View Full Code Here

TOP

Related Classes of org.jgroups.stack.AddressGenerator

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.