Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15403

JGroupsTransport: address generator impl misses method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Optional Optional
    • 14.0.22.Final, 15.0.0.Final
    • 14.0.19.Final, 15.0.0.Final
    • Core
    • None

      AddressGenerator was changed in 5.2.15 to include a second method:

      public interface AddressGenerator {
          @Deprecated(since="5.2.15")
          Address generateAddress();
          default Address generateAddress(String name) {
              return generateAddress();
          }
      }
      

      JGroupsTransport does not implement the second method, so that a member may not be associated with a name, e.g. in RELAY2. The correct impl in JGroupsTransport:460 is:

      if (connectChannel) {
                  channel.addAddressGenerator(new AddressGenerator() {
                     @Override
                     public org.jgroups.Address generateAddress() {
                        return JGroupsTopologyAwareAddress.randomUUID(channel.getName(), transportCfg.siteId(),
                                                                      transportCfg.rackId(), transportCfg.machineId());
                     }
      
                     @Override
                     public org.jgroups.Address generateAddress(String name) {
                        return JGroupsTopologyAwareAddress.randomUUID(name, transportCfg.siteId(),
                                                                      transportCfg.rackId(), transportCfg.machineId());
                     }
                  });
               } else {
      

              pruivo@redhat.com Pedro Ruivo
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: