Package com.sun.corba.ee.spi.folb

Examples of com.sun.corba.ee.spi.folb.ClusterInstanceInfo


          arrayOfSocketInfo[x++] = si;
        }
        _logger.fine("server.getLbWeight() = "+ server.getLbWeight());
        // REVISIT - default 100 weight
        // Not used by JNLP but should put in the actual weight.
        ClusterInstanceInfo clusterInstanceInfo =
          new ClusterInstanceInfo(serverName, (Integer.valueOf(server.getLbWeight())).intValue(), arrayOfSocketInfo);
        result.add(clusterInstanceInfo);
        if (_logger.isLoggable(Level.FINE)) {
          _logger.log(Level.INFO,
          baseMsg + ".getClusterForInstance: " +
          ASORBUtilities.toString(clusterInstanceInfo));
View Full Code Here


  String server_identifier = ""; //for bootstrapping, can be ""
  String type = "CLEAR_TEXT"; //will be clear_text for bootstrapping
  SocketInfo socketInfo = new SocketInfo(type,
                 host_port[0],
                 new Integer(host_port[1]).intValue());
  ClusterInstanceInfo instanceInfo =
      new ClusterInstanceInfo(server_identifier,
            weight,
            new SocketInfo[]{socketInfo});
  return instanceInfo;
 
    }
View Full Code Here

    * present in the endpointsList vector
    */
    private synchronized boolean notDuplicate(String str) {
  String[] host_port = str.split(":");
  for (ClusterInstanceInfo endpoint : endpointsList) {
      ClusterInstanceInfo instanceInfo = endpoint;
      for(int j = 0; j < instanceInfo.endpoints.length; j++) {
    if (instanceInfo.endpoints[j].host.equals(host_port[0]) &&
        instanceInfo.endpoints[j].port ==
        new Integer(host_port[1]).intValue()) {
        return false;
View Full Code Here

   */
    public synchronized void print() {
        _logger.fine("List contents ==> ");
  int i = 0;
  for (ClusterInstanceInfo endpoint : endpointsList) {
      ClusterInstanceInfo instanceInfo = endpoint;
     
      _logger.fine("endpoint[" + i + "] ==> name =" +
       instanceInfo.name + " weight = " +
       instanceInfo.weight);
      for (int j = 0; j < instanceInfo.endpoints.length; j++ ) {
View Full Code Here

                        "IiopFolbGmsClient(): " + gms.getGroupHandle().toString() +
                         " initializing to: " + entrySet.toString());
            }

          for (Map.Entry entry : entrySet) {
                ClusterInstanceInfo cii = convert((String)entry.getKey(), (List<IiopInfo>)entry.getValue());
                currentMembers.put((String)entry.getKey(), cii);
            }

            // complete initialization of instance variables used by handlers before registering the handlers.
            // (Fix for bugster issue 6681575)
View Full Code Here

            }

            boolean contains = false;
            synchronized (currentMembers) {
                contains = currentMembers.containsKey(instanceName);
                ClusterInstanceInfo value = currentMembers.get(instanceName);
                if (contains && value != null) {
                    if (_logger.isLoggable(Level.FINE)) {
                        _logger.log(Level.FINE,
                                "IiopFolbGmsClient.addMember: " + instanceName + " already present: no action");
                    }
                } else {
                    ClusterInstanceInfo clusterInstanceInfo = convert(signal);
                    if (clusterInstanceInfo == null && _logger.isLoggable(Level.FINE)) {
                        _logger.log(Level.FINE, "not able to compute ClusterInstanceInfo for member" +
                                "IiopFolbGmsClient.addMember: " + instanceName + " dsc info: " + IiopInfo.IIOP_MEMBER_DETAILS_KEY + " not initialized yet and was null " +
                                " gms groupname " + gms.getGroupHandle().toString());
                    }
View Full Code Here

    }

    private ClusterInstanceInfo convert(final String instanceName,
          final List<IiopInfo> iiopInfoList)
    {
  ClusterInstanceInfo clusterInstanceInfo = null;
  try {
            if(_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,
          "IiopFolbGmsClient.convert->: " + instanceName);
      }

      List<SocketInfo> listOfSocketInfo = new LinkedList<SocketInfo>();

      int weight = -1;
      // bug 6502567
      // the list should never be null.
      //Fix is already in Shoal workspace, but not integrated into 9.1FCS
      if (iiopInfoList == null) {
          _logger.fine("GMS did not return the list of members. list is empty.");
    return null;
      }
      for (IiopInfo iiopInfo : iiopInfoList) {
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,
        "IiopFolbGmsClient.convert: " + instanceName
        + ": " + iiopInfo.toString());
    }
    // REVISIT
    // Make sure all weights equal
    if (weight == -1) {
        weight = iiopInfo.getWeight();
        if(_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,
            "IiopFolbGmsClient.convert: "
            + instanceName
            + ": weight: " + Integer.toString(weight));
        }
    }
    String type = iiopInfo.getID();
    String host = iiopInfo.getAddress();
    String port = iiopInfo.getPort();
     
    // REVISIT - need to check all forms of "all interfaces"
    if ("0.0.0.0".equals(host)) {
        String hostname = iiopInfo.getHostName();
        if(_logger.isLoggable(Level.FINE)) {
      _logger.log(Level.FINE,
            "IiopFolbGmsClient.convert: "
            + instanceName
            + ": host is: " + host
            + "; changing to: " + hostname);
        }
        host = hostname;
    }
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,
        "IiopFolbGmsClient.convert: " + instanceName
        + ": type/host/port:"
        + " " + type + " " + host + " " + port);
    }
    listOfSocketInfo.add(
                    new SocketInfo(type, host, Integer.valueOf(port)));
      }
      // REVISIT - make orbutil utility
      SocketInfo[] arrayOfSocketInfo =
    new SocketInfo[listOfSocketInfo.size()];
      int i = 0;
      for (SocketInfo si : listOfSocketInfo) {
    arrayOfSocketInfo[i++] = si;
      }
      clusterInstanceInfo =
    new ClusterInstanceInfo(instanceName, weight,
          arrayOfSocketInfo);

      return clusterInstanceInfo;    

  } finally {
View Full Code Here

                                    .formatStringArray(adapterName));
                }
                synchronized (currentMembers) {
                    for (Map.Entry<String, ClusterInstanceInfo> entry : currentMembers.entrySet()) {
                        String currentInstance = entry.getKey();
                        ClusterInstanceInfo cii = entry.getValue();
                        if (cii == null) {

                            // was not able to get info from distributed cache in past, try again.
                            Map<Serializable, Serializable> currentInstanceMemberDetails = gms.getMemberDetails(currentInstance);
                            if (currentInstanceMemberDetails != null) {
View Full Code Here

      synchronized (this) {
    if (currentMembers.get(instanceName) != null) {
                    fineLog( "IiopFolbGmsClient.addMember: {0} already present: no action",
                            instanceName);
    } else {
        ClusterInstanceInfo clusterInstanceInfo =
                        getClusterInstanceInfo(instanceName) ;

        currentMembers.put( clusterInstanceInfo.name(),
                        clusterInstanceInfo);

                    fineLog( "IiopFolbGmsClient.addMember: {0} added - notifying listeners",
                        instanceName);
View Full Code Here

                resolvePort( server, il ) ) ;
            sinfos.add( sinfo ) ;
        }
        fineLog( "getClusterInstanceInfo: sinfos {0}", sinfos ) ;

        final ClusterInstanceInfo result = new ClusterInstanceInfo( name, weight,
            sinfos ) ;
        fineLog( "getClusterInstanceInfo: result {0}", result ) ;

        return result ;
    }
View Full Code Here

TOP

Related Classes of com.sun.corba.ee.spi.folb.ClusterInstanceInfo

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.