public static void main()

in persistence/src/main/java/org/apache/geode_examples/persistence/Example.java [26:43]


  public static void main(String[] args) {
    // connect to the locator using default port 10334
    ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 10334)
        .set("log-level", "WARN").create();

    // create a local region that matches the server region
    Region<String, Integer> region =
        cache.<String, Integer>createClientRegionFactory(ClientRegionShortcut.PROXY)
            .create("example-region");

    Example example = new Example(region);
    final int previous = example.getCounter();
    example.increment();
    final int current = example.getCounter();
    System.out.println(previous + " -> " + current);

    cache.close();
  }