Examples of ServerInstance


Examples of org.jboss.as.console.client.domain.model.ServerInstance

            }
        });
    }

    private ServerInstance createInstanceModel(Server handle) {
        ServerInstance instance = factory.serverInstance().as();
        instance.setName(handle.getName());
        instance.setServer(handle.getName());
        instance.setGroup(handle.getGroup());
        instance.setProfile(handle.getProfile());
        return instance;
    }
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.ServerInstance

            @Override
            public void onSuccess(List<ServerInstance> serverInstances) {

                if(serverInstances.isEmpty())
                {
                    ServerInstance blank = factory.serverInstance().as();
                    blank.setHost("not-set");
                    blank.setName("not-set");
                    callback.onSuccess(new ServerInstanceList(blank, Collections.EMPTY_LIST));
                }
                else
                {
                    ServerInstance server = getSelectedServerInstance(serverInstances);
                    callback.onSuccess(new ServerInstanceList(server, serverInstances));
                }
            }
        });
    }
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.ServerInstance

    }

    private ServerInstance getSelectedServerInstance(List<ServerInstance> serverInstances) {
        assert !serverInstances.isEmpty();

        ServerInstance matched = null;

        ServerInstance active = null;

        // match by preselection
        for(ServerInstance server : serverInstances)
        {
            if(server.isRunning())
View Full Code Here

Examples of org.jboss.as.console.client.domain.model.ServerInstance

            // server instances
            for (int x = 0; x < (Random.nextInt(5) + 1); x++)
            {
                int groupIndex = Random.nextInt(groupNames.length - 1);
                ServerInstance serverInstance = beanFactory.serverInstance().as();
                serverInstance.setGroup(groupNames[groupIndex]);
                serverInstance.setRunning((groupIndex % 2 == 0));
                if (serverInstance.isRunning())
                {
                    if (Random.nextBoolean())
                    {
                        serverInstance.setFlag(Random.nextBoolean() ? RESTART_REQUIRED : RELOAD_REQUIRED);
                    }
                    else
                    {
                        serverInstance.setFlag(null);
                    }
                }
                serverInstance.setName(groupNames[groupIndex] + "-" + x);
                serverInstance.setSocketBindings(Collections.<String, String>emptyMap());
                serverInstance.setInterfaces(Collections.<String, String>emptyMap());

                host.getServerInstances().add(serverInstance);
            }
            hostInfos.add(host);
        }
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

        if(clbMonitoringManager.isCLBMonitoringEnabled()){
            clbMonitoringManager.getCLBStatsUpdater().
                    incrementTotalIncomingSipRequestsFE();
        }
       
        ServerInstance serverInstance = router.selectInstance(req);
        if (serverInstance == null) {
            throw new SipRoutingException("Could not find a server");
        }

        String hashkey = req.getHashKey();

        request.setBeKey(hashkey);

        if (logger.isLoggable(Level.FINER)) {
            logger.log(Level.FINER,
                "Hash key: " + hashkey + "; server: " +
                serverInstance.getName()+"; isLocal: "+serverInstance.isLocalInstance());
        }

        if (serverInstance.isLocalInstance()) {
            if(clbMonitoringManager.isCLBMonitoringEnabled()){
                clbMonitoringManager.getCLBStatsUpdater().
                        incrementTotalLocalSipRequestsFE();
            }
            // Continue on this instance
            return null;
        } else {
            if(clbMonitoringManager.isCLBMonitoringEnabled()){
                clbMonitoringManager.getCLBStatsUpdater().
                        incrementTotalProxiedSipRequestsFE();
            }
            // Proxy to the other instance
            Socket serverAddress = getServerAddress(
                    serverInstance.getEndPoint(CLBConstants.SIP_PROTOCOL));
            Socket outgoingSocket =  null;
            //update via with proper param
            if(controller.getLocalInstance() != null){
                EndPoint endPoint = controller.getLocalInstance().getEndPoint(
                        CLBConstants.SIP_PROTOCOL);                             
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

                        clbMonitoringManager.getCLBStatsUpdater().
                                incrementTotalIncomingSipResponsesFE();
                    }
                    // This response was received from an external party and
                    // shall possibly be forwarded to a back-end
                    ServerInstance serverInstance =
                            getServerInstanceForResponse(response);

                    return handleResponseFromExternalParty(response,
                        serverInstance);
                }
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

                //remove the quotes around the beroute value
                instanceID = instanceID.substring(
                        1, (instanceID.length() - 1));
               
                ServerInstance serverInstance =
                    controller.getGlobalInstanceMap().
                        getServerInstance(instanceID);

                if (serverInstance == null) {
                    // Should never happen, drop response
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

     * @param req the request
     * @return an instance to server the specified request, or null if none was
     *         found.
     */
    public ServerInstance selectInstance(ConsistentHashRequest req) {
        ServerInstance server = stickyRouter.selectInstance(req);

        if (server != null) {
            return server;
        }

View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

    protected ServerInstance getServerInstance(ConsistentHashRequest req) {
        if (req.getHashKey() == null) {
            return null;
        }

        ServerInstance server = null;

        if (requireIdealHash) {
            // First try "ideal" router
            server  = idealConsistentHash.get(req.getHashKey());
            if (server != null) {

                /* Need to select another instance from cluster in below cases
                 * 1. Instance is unhealthy
                 * 2. Instance is disabled. In consistent hash router,
                 *    we do not worry about instance being quiesced or not
                 */
                if (recoveringInstances.contains(server) ||
                        !server.isHealthy() ||
                        server.isDisabled()) {
                    if(req.isSticky() &&
                            clbMonitoringManager.isCLBMonitoringEnabled()){
                        if(req.isHttp()){
                            clbMonitoringManager.getCLBStatsUpdater().
                                    incrementTotalFailedOverHttpRequestsFE();
                        }else{
                            clbMonitoringManager.getCLBStatsUpdater().
                                    incrementTotalFailedOverSipRequestsFE();
                        }
                    }
                    //select another instance from cluster
                    server = ((ConsistentHashRouter) server.getServerCluster().
                            getClusterRouter(RouterFactory.LBPolicy_CONSISTENT_HASH)).selectInstance(req);
                }
            }
        }

View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.core.ServerInstance

    protected ServerInstance getActiveInstance(ConsistentHashRequest req) {
        if (req.getHashKey() == null) {
            return null;
        }

        ServerInstance server;
        server = actualConsistentHash.get(req.getHashKey());

        return server;
    }
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.