Package com.gemstone.gemfire.cache.client

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


    isClient = true;
    DistributionLocatorId locator = null;
    if (locatorStr != null) {
      locator = new DistributionLocatorId(locatorStr);
    }
    ClientCacheFactory ccf = new ClientCacheFactory();
    if (serverPort != 0) {
      ccf.addPoolServer(serverHost, serverPort);
    } else if (locator != null) {
      ccf.addPoolLocator(locator.getHost().getCanonicalHostName(), locator.getPort());
    }
    cache = ccf.create();
  }
View Full Code Here


  private String streamName = "gftest";

  @Before
  public void setUp() {
    clientCache =
        new ClientCacheFactory().addPoolServer(xdEnvironment.getGemfireHost(), xdEnvironment.getGemfirePort())
            .create();
    stocks = clientCache.getRegion("/Stocks");
    if (stocks == null) {
      stocks = clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create("Stocks");
    }
View Full Code Here

 
  protected Boolean readyForEvents = false;

  @Override
  protected GemFireCache createCache(Object factory) {
    ClientCacheFactory clientCacheFactory = (ClientCacheFactory) factory;

    initializePool(clientCacheFactory);

    GemFireCache cache = clientCacheFactory.create();

    // register for events after Pool and Regions been created and iff non-durable client...
    readyForEvents();

    return cache;
View Full Code Here

    return cache;
  }

  @Override
  protected Object createFactory(Properties gemfireProperties) {
    return new ClientCacheFactory(gemfireProperties);
  }
View Full Code Here

    Properties props = new Properties();
    props.put("mcast-port", "0");
    props.put("name", "cq-client");
    props.put("log-level", "warning");

    ClientCacheFactory ccf = new ClientCacheFactory(props);
    ccf.setPoolSubscriptionEnabled(true);
    cache = ccf.create();
  }
View Full Code Here

    Properties props = new Properties();
    props.put("mcast-port", "0");
    props.put("name", "function-client");
    props.put("log-level", "warning");

    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");
View Full Code Here

    Properties props = new Properties();
    props.put("mcast-port", "0");
    props.put("name", "function-client");
    props.put("log-level", "warning");

    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");
View Full Code Here

  }
  @Override
  protected Object createFactory(Properties gemfireProperties) {
    ((StubCache)cache).setProperties(gemfireProperties);
    return new ClientCacheFactory(gemfireProperties);
  }
View Full Code Here

TOP

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

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.