Interface ClientRegionFactory<K,V>


public interface ClientRegionFactory<K,V>
A factory for constructing client cache regions. Instances of this interface can be created using region shortcuts by calling ClientCache.createClientRegionFactory(ClientRegionShortcut) or using named region attributes by calling ClientCache.createClientRegionFactory(String).

The factory can then be customized using its methods.

The final step is to produce a Region by calling create(String).

Client regions may be:

  • PROXY: which pass through to server and have no local data.
  • CACHING_PROXY: which fetch data from servers and cache it locally.
  • LOCAL: which only have local data; they do not communicate with the servers.
See ClientRegionShortcut for the shortcuts for these three types of client regions.

Example: Create a client region with a CacheListener

 ClientCache c = new ClientCacheFactory().addLocator(host, port).create();
 // Create local caching region that is connected to a server side region
 // Add a cache listener before creating region
 Region r =
     c.createClientRegionFactory(CACHING_PROXY).addCacheListener(myListener).create("customers");
 
Since:
GemFire 6.5