Package com.gemstone.gemfire.cache.client

Examples of com.gemstone.gemfire.cache.client.PoolFactory


            "at least one locator or server is required");
      }

      internalPool = true;

      PoolFactory poolFactory = PoolManager.createFactory();

      if (!CollectionUtils.isEmpty(locators)) {
        for (InetSocketAddress connection : locators) {
          poolFactory.addLocator(connection.getHostName(),
              connection.getPort());
        }
      }

      if (!CollectionUtils.isEmpty(servers)) {
        for (InetSocketAddress connection : servers) {
          poolFactory.addServer(connection.getHostName(),
              connection.getPort());
        }
      }

      poolFactory.setFreeConnectionTimeout(freeConnectionTimeout);
      poolFactory.setIdleTimeout(idleTimeout);
      poolFactory.setLoadConditioningInterval(loadConditioningInterval);
      poolFactory.setMaxConnections(maxConnections);
      poolFactory.setMinConnections(minConnections);
      poolFactory.setMultiuserAuthentication(multiUserAuthentication);
      poolFactory.setPingInterval(pingInterval);
      poolFactory.setPRSingleHopEnabled(prSingleHopEnabled);
      poolFactory.setReadTimeout(readTimeout);
      poolFactory.setRetryAttempts(retryAttempts);
      poolFactory.setServerGroup(serverGroup);
      poolFactory.setSocketBufferSize(socketBufferSize);
      poolFactory.setStatisticInterval(statisticInterval);
      poolFactory.setSubscriptionEnabled(subscriptionEnabled);
      poolFactory.setSubscriptionAckInterval(subscriptionAckInterval);
      poolFactory
          .setSubscriptionMessageTrackingTimeout(subscriptionMessageTrackingTimeout);
      poolFactory.setSubscriptionRedundancy(subscriptionRedundancy);
      poolFactory.setThreadLocalConnections(threadLocalConnections);
    
      pool = poolFactory.create(name);
    }
  }
View Full Code Here


    ClientCacheFactory ccf = new ClientCacheFactory(props);
    ccf.setPoolSubscriptionEnabled(true);
    cache = ccf.create();

    PoolFactory pf = PoolManager.createFactory();
    pf.addServer("localhost", 40404);
    pf.setSubscriptionEnabled(true);
    pool = pf.create("client");

    ClientRegionFactory<String, Integer> crf = cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
    crf.setPoolName("client");
    clientRegion = crf.create("test-function");
  }
View Full Code Here

    ClientCacheFactory ccf = new ClientCacheFactory(props);
    ccf.setPoolSubscriptionEnabled(true);
    cache = ccf.create();

    PoolFactory pf = PoolManager.createFactory();
    pf.addServer("localhost", 40404);
    pf.setSubscriptionEnabled(true);
    pool = pf.create("client");

    ClientRegionFactory<String, Integer> crf = cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
    crf.setPoolName("client");
    clientRegion = crf.create("test-function");
  }
View Full Code Here

TOP

Related Classes of com.gemstone.gemfire.cache.client.PoolFactory

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.