Examples of PhysicalAddress


Examples of org.jgroups.PhysicalAddress

             stubManager = new TUNNELStubManager(this,group,local,getReconnectInterval());
             for (InetSocketAddress gr : gossip_router_hosts) {
                 RouterStub stub = stubManager.createStub(gr.getHostName(), gr.getPort(), bind_addr);
                 stub.setTcpNoDelay(tcp_nodelay);          
             
             PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local));
             List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
             String logical_name=org.jgroups.util.UUID.get(local);
             List<RouterStub> stubs = stubManager.getStubs();
             tunnel_policy.connect(stubs, group, local, logical_name, physical_addrs);
            break;
View Full Code Here

Examples of org.jgroups.PhysicalAddress

            return;
        }
        if (log.isTraceEnabled())
            log.trace("consolidated mbrs from GossipRouter(s) are " + initial_mbrs);

        PhysicalAddress physical_addr=(PhysicalAddress)down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
        PingData data=new PingData(local_addr, null, false, UUID.get(local_addr), Arrays.asList(physical_addr));

        for (Address mbr_addr : initial_mbrs) {
            Message msg = new Message(mbr_addr);
            msg.setFlag(Message.OOB);
View Full Code Here

Examples of org.jgroups.PhysicalAddress

    }


    protected void connect(String group, Address logical_addr) {
        String logical_name=org.jgroups.util.UUID.get(logical_addr);
        PhysicalAddress physical_addr=(PhysicalAddress)down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
        List<PhysicalAddress> physical_addrs=physical_addr != null? new ArrayList<PhysicalAddress>() : null;
        if(physical_addr != null)
            physical_addrs.add(physical_addr);

     
View Full Code Here

Examples of org.jgroups.PhysicalAddress

             } else {
                 // TODO [JGRP-1194] - Revisit implementation of TUNNEL and shared transport  
                 ProtocolAdapter adapter = ProtocolAdapter.thread_local.get();
                 local = adapter.local_addr;
             }
             PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local));
             List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
             String logical_name=org.jgroups.util.UUID.get(local);
             tunnel_policy.connect(stubs, group, local, logical_name, physical_addrs);
            break;
View Full Code Here

Examples of org.jgroups.PhysicalAddress

                      if (log.isInfoEnabled()) {
                          log.info("Reconnecting " + stub);
                      }

                      if(!isSingleton()){
                          PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
                          List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
                          stub.connect(channel_name, local_addr, UUID.get(local_addr), physical_addrs);
                          if (log.isInfoEnabled()) {
                              log.info("Reconnected " + stub);
                          }
                      }
                      // TODO [JGRP-1194] - Revisit implementation of TUNNEL and shared transport
                      else {
                          for(Protocol p: up_prots.values()) {
                              if(p instanceof ProtocolAdapter) {
                                  Address local=((ProtocolAdapter)p).local_addr;
                                  String cluster_name=((ProtocolAdapter)p).cluster_name;
                                  PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local));
                                  List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
                                  stub.connect(cluster_name, local, UUID.get(local), physical_addrs);
                                  if (log.isInfoEnabled()) {
                                      log.info("Reconnected " + stub);
                                  }
View Full Code Here

Examples of org.jgroups.PhysicalAddress



    public void sendGetMembersRequest(String cluster_name, Promise promise) throws Exception{
        List<PingData> existing_mbrs=readAll(cluster_name);
        PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
        List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
        PingData data=new PingData(local_addr, null, false, UUID.get(local_addr), physical_addrs);

        // If we don't find any files, return immediately
        if(existing_mbrs.isEmpty()) {
View Full Code Here

Examples of org.jgroups.PhysicalAddress

        if (pingDao == null) {
            log.info("No PingDao set, skiping save of physical address for cluster " + clusterName);
            return;
        }
       
        PhysicalAddress physicalAddr = (PhysicalAddress) down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
        pingDao.addAddress(clusterName, local_addr, physicalAddr);
    }
View Full Code Here

Examples of org.jgroups.PhysicalAddress

                final Map<Address, PhysicalAddress> result = new HashMap<Address, PhysicalAddress>();
               
                while (rs.next()) {
                    try {
                        final Address memberAddress = getStreamableParam(rs, Table.COL_MEMBER_ADDRESS);
                        final PhysicalAddress physicalAddress = getStreamableParam(rs, Table.COL_PHYSICAL_ADDRESS);
                       
                        result.put(memberAddress, physicalAddress);
                    }
                    catch (Exception e) {
                        logger.warnDebug("Ignoring address result due to data parsing error", e);
View Full Code Here

Examples of org.jgroups.PhysicalAddress

                 local = local_addr;                
             } else {
                 ProtocolAdapter adapter = ProtocolAdapter.thread_local.get();
                 local = adapter.local_addr;
             }
             PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local));
             List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
             String logical_name=org.jgroups.util.UUID.get(local);
             tunnel_policy.connect(stubs, group, local, logical_name, physical_addrs);
            break;
View Full Code Here

Examples of org.jgroups.PhysicalAddress

                      if (log.isDebugEnabled()) {
                          log.debug("Reconnecting to router at " + stub.getGossipRouterAddress());
                      }

                      if(!isSingleton()){
                          PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
                          List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
                          stub.connect(channel_name, local_addr, UUID.get(local_addr), physical_addrs);
                          if (log.isDebugEnabled()) {
                              log.debug("Reconnected to router at " + stub.getGossipRouterAddress());
                          }
                      }
                      else {
                          for(Protocol p: up_prots.values()) {
                              if(p instanceof ProtocolAdapter) {
                                  Address local=((ProtocolAdapter)p).local_addr;
                                  String cluster_name=((ProtocolAdapter)p).cluster_name;
                                  PhysicalAddress physical_addr=(PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, local));
                                  List<PhysicalAddress> physical_addrs=Arrays.asList(physical_addr);
                                  stub.connect(cluster_name, local, UUID.get(local), physical_addrs);
                                  if (log.isDebugEnabled()) {
                                      log.debug("Reconnected to router at " + stub.getGossipRouterAddress());
                                  }
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.