public interface ClientCache extends GemFireCache
ClientCache provides access to functionality when a member connects as a client to GemFire servers. It provides the following services:
A ClientCache connects to a server using a
Pool. This pool can be configured in the
ClientCacheFactory (by default GemFire tries to create a pool which tries to connect to a server
on the localhost on port 40404). This default pool is used by
Regions (created using
ClientRegionFactory) to talk to regions on the server.
More pools can be created using
PoolManager or by declaring them in cache.xml.
|Modifier and Type||Method and Description|
Terminates this object cache and releases all the resources.
Creates an authenticated cache view using the given user security properties on the client cache's default pool.
Creates an authenticated cache view using the given user security properties using the given pool to connect to servers.
Create and return a client region factory that is initialized to create a region using the given predefined region attributes.
Create and return a client region factory that is initialized to create a region using the given named region attributes.
Returns a set of the servers to which this client is currently connected.
Returns the default server pool.
Return a QueryService that queries the local state in the client cache.
Return the QueryService for the named pool.
Notifies the server that this durable client is ready to receive updates.
createDiskStoreFactory, createGatewaySenderFactory, findDiskStore, getCacheTransactionManager, getCopyOnRead, getDistributedSystem, getInitializer, getInitializerProps, getJNDIContext, getLogger, getName, getPdxDiskStore, getPdxIgnoreUnreadFields, getPdxPersistent, getPdxReadSerialized, getPdxSerializer, getRegionAttributes, getResourceManager, getSecurityLogger, listRegionAttributes, loadCacheXml, registerPdxMetaData, setCopyOnRead, setRegionAttributes
QueryService getQueryService(String poolName)
void close(boolean keepalive)
Region.close()on each region in the cache. After this cache is closed, any further method call on this cache or any region object will throw
CacheClosedException, unless otherwise noted.
keepalive- whether the server should keep the durable client's queues alive for the timeout period
CacheClosedException- if the cache is already closed.
<K,V> ClientRegionFactory<K,V> createClientRegionFactory(ClientRegionShortcut shortcut)
shortcut- the predefined region attributes to initialize the factory with.
<K,V> ClientRegionFactory<K,V> createClientRegionFactory(String regionAttributesId)
Named region attributes are defined in cache.xml by setting the name as the value of the
id attribute on a
regionAttributesId- the named region attributes to initialize the factory with.
IllegalStateException- if named region attributes has not been defined.
Durable clients must call this method after they are done creating regions and issuing interest
registration requests.If it is called before then events will be lost.Any time a new
Pool is created and regions have been added to it then this method needs to be called
IllegalStateException- if called by a non-durable client
RegionService createAuthenticatedView(Properties userSecurityProperties)
multiuser-authentication to be set to true on the default pool.
Applications must use this instance to do operations, when multiuser-authentication is set to true.
Authenticated cache views are only allows to access
RegionService.getRegion(java.lang.String) method will throw IllegalStateException if an
attempt is made to get a region that has local storage.
RegionService createAuthenticatedView(Properties userSecurityProperties, String poolName)
multiuser-authenticationto be set to true on the given pool.
createAuthenticatedView(Properties) for more information on the returned cache
userSecurityProperties- the security properties of a user.
poolName- - the pool that the users should be authenticated against.
RegionServiceinstance associated with a user and the given properties.