Package com.caringo.client.locate

Examples of com.caringo.client.locate.StaticLocator


            throw new ConfigurationException("No CAStor nodes specified in '" + mountedRoot + "'");
        }
        String[] castorNodes = ips.toArray(new String[0])// list of configured nodes
        if (clusterName == null) {
            try {
                _locator = new StaticLocator(castorNodes, castorPort, LOCATOR_RETRY_TIMEOUT);
                _locator.start();
            } catch (IOException e) {
                throw new ConfigurationException("Could not create CAStor static locator for '" +
                                                 Arrays.toString(castorNodes) + "'");
            }
View Full Code Here


            throw new ConfigurationException("No CAStor nodes specified in '" + mountedRoot + "'");
        }
        String[] castorNodes = ips.toArray(new String[0])// list of configured nodes
        if (clusterName == null) {
            try {
                _locator = new StaticLocator(castorNodes, castorPort, LOCATOR_RETRY_TIMEOUT);
                _locator.start();
            } catch (IOException e) {
                throw new ConfigurationException("Could not create CAStor static locator for '" + Arrays.toString(castorNodes) + "'");
            }
        } else {
View Full Code Here

     *            be allowed.
     * @param maxRetries -
     *            Maximum number of times to retry a command on communication or server failure.
     */
    public ScspClient(String[] hosts, int port, int maxConnectionPoolSize, int maxRetries) {
        this.locator = new LocatorRedirectHandler(new StaticLocator(hosts, port, LOCATOR_RETRY_TIMEOUT));
        this.maxPoolSize = maxConnectionPoolSize;
        this.maxRetries = maxRetries;
        this.validating = false;
        this.connectionTimeout = CONNECTION_TIMEOUT;
        this.poolTimeout = CM_IDLE_TIMEOUT;
View Full Code Here

     *            The amount of time seconds an idle connection will be stored for reuse.
     * @param locatorRetryTimeout -
     *            The number of seconds after a node is found dead that it will be retried.
     */
    public ScspClient(String[] hosts, int port, int maxConnectionPoolSize, int maxRetries, int connectionTimeout, int poolTimeout, int locatorRetryTimeout) {
        this.locator = new LocatorRedirectHandler(new StaticLocator(hosts, port, locatorRetryTimeout));
        this.maxPoolSize = maxConnectionPoolSize;
        this.maxRetries = maxRetries;
        this.validating = false;
        this.connectionTimeout = connectionTimeout * 1000;
        this.poolTimeout = poolTimeout * 1000;
 
View Full Code Here

            this.proxyAddr = proxyAddr;
            this.proxyPort = proxyPort;
        }
       
        public InetSocketAddress[] discoverNodes() {
            StaticLocator subLocator = new StaticLocator();
            HttpClient httpCli = new HttpClient();
            ScspHeaders metaData = new ScspHeaders();
           
            subLocator.addAddress(proxyAddr, proxyPort);
           
            if (0 < clusterName.length()) {
                metaData.addValue("Scsp-Proxy-Cluster", clusterName);
            }
View Full Code Here

            throw new ConfigurationException("No CAStor nodes specified in '" + mountedRoot + "'");
        }
        String[] castorNodes = ips.toArray(new String[0])// list of configured nodes
        if (clusterName == null) {
            try {
                _locator = new StaticLocator(castorNodes, castorPort, LOCATOR_RETRY_TIMEOUT);
                _locator.start();
            } catch (IOException e) {
                throw new ConfigurationException("Could not create CAStor static locator for '" +
                                                 Arrays.toString(castorNodes) + "'");
            }
View Full Code Here

TOP

Related Classes of com.caringo.client.locate.StaticLocator

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.