Package org.apache.stanbol.commons.solr.managed

Examples of org.apache.stanbol.commons.solr.managed.ManagedSolrServer


            log.error("Unable to remove Managed Index because the required Property '{}'" +
                "used to define the name of the Index is missing",INDEX_NAME);
            setFinishedState(ResourceState.IGNORED);
        } else {
            String serverName = (String) getResource().getAttribute(ManagedIndexConstants.SERVER_NAME);
            ManagedSolrServer server = managedServers.get(serverName);
            if(server == null){
                log.warn("Unable to remove Managed Solr Index {} because the {} " +
                    "Server {} is currently not active!",
                    new Object[]{indexName,serverName == null ? "default" : "",
                            serverName != null ? serverName : ""});
                setFinishedState(ResourceState.IGNORED);
            } else {
                server.removeIndex(indexName, true);
                setFinishedState(ResourceState.UNINSTALLED);
            }
        }
    }
View Full Code Here


        } else {
            map = new HashMap<String,ManagedSolrServer>();
            if(serverRefs.length > 1){
                Arrays.sort(serverRefs,ServiceReferenceRankingComparator.INSTANCE);
            }
            ManagedSolrServer defaultServer = null;
            for(ServiceReference ref : serverRefs){
                ManagedSolrServer server = (ManagedSolrServer)serverTracker.getService(ref);
                if(server != null){ //may become inactive in the meantime
                    map.put(server.getServerName(), server);
                    if(defaultServer == null){
                        defaultServer = server;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.solr.managed.ManagedSolrServer

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.