GemFire 6.6.3

com.gemstone.gemfire.cache.util
Class BridgeClient

java.lang.Object
  extended by com.gemstone.gemfire.cache.util.BridgeWriter
      extended by com.gemstone.gemfire.cache.util.BridgeClient
All Implemented Interfaces:
CacheCallback, CacheLoader, CacheWriter, Declarable

Deprecated. as of 5.7 use pools instead.

@Deprecated
public class BridgeClient
extends BridgeWriter
implements CacheLoader

This class combines the BridgeWriter and BridgeLoader functionality into one class, sharing BridgeServer connections, optimizing the number of connections required when using a BridgeWriter and BridgeLoader separately.

When a BridgeClient is declared in cache.xml it can be installed as either a cache-loader or as a cache-writer and it will automatically be installed as both the loader and writer for that region. This allows a single instance to be declared in XML and used as both the cache-loader and cache-writer thus reducing the number of connections to the server.

For configuration details please see the BridgeWriter and the BridgeLoader.

Since:
5.0.1
See Also:
BridgeLoader, BridgeWriter, BridgeServer

Constructor Summary
BridgeClient()
          Deprecated.  
 
Method Summary
 void attach(Region r)
          Deprecated. Notify the BridgeClient that the given Region will begin delivering events to this BridgeClient.
 void close()
          Deprecated. Called when a region using this BridgeWriter is destroyed, when the cache is closed, or when a callback is removed from a region using an AttributesMutator.
 void detach(Region r)
          Deprecated. Notify the BridgeClient that the given region is no longer relevant.
 BridgeLoader getBridgeLoader()
          Deprecated. Return the internally maintained BridgeLoader
 void init(BridgeWriter bridgeWriter)
          Deprecated. Initializes this writer from an existing BridgeWriter.
 void init(Properties p)
          Deprecated. Initializes the writer with supplied config parameters.
 boolean isClosed()
          Deprecated. Returns true if this BridgeClient has been closed.
 Object load(LoaderHelper helper)
          Deprecated. Loads a value.
static void loadEmergencyClasses()
          Deprecated. Ensure that the BridgeLoader class gets loaded.
 String toString()
          Deprecated. Returns a string description of the BridgeClient
 
Methods inherited from class com.gemstone.gemfire.cache.util.BridgeWriter
addEndpoint, beforeCreate, beforeDestroy, beforeRegionClear, beforeRegionDestroy, beforeUpdate, getAttachCount, getConnectionProxy, getLBPolicy, getProperties, getReadTimeout, getRetryAttempts, getRetryInterval, hasEstablishCallbackConnection, release, removeEndpoint, terminate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BridgeClient

public BridgeClient()
Deprecated. 
Method Detail

load

public Object load(LoaderHelper helper)
            throws CacheLoaderException
Deprecated. 
Description copied from interface: CacheLoader
Loads a value. Application writers should implement this method to customize the loading of a value. This method is called by the caching service when the requested value is not in the cache. Any exception (including an unchecked exception) thrown by this method is propagated back to and thrown by the invocation of Region.get(Object, Object) that triggered this load.

Specified by:
load in interface CacheLoader
Parameters:
helper - a LoaderHelper object that is passed in from cache service and provides access to the key, region, argument, and netSearch.
Returns:
the value supplied for this key, or null if no value can be supplied. A local loader will always be invoked if one exists. Otherwise one remote loader is invoked. Returning null causes Region.get(Object, Object) to return null.
Throws:
CacheLoaderException
See Also:
Region.get

loadEmergencyClasses

public static void loadEmergencyClasses()
Deprecated. 
Ensure that the BridgeLoader class gets loaded.

See Also:
SystemFailure.loadEmergencyClasses()

close

public void close()
Deprecated. 
Description copied from class: BridgeWriter
Called when a region using this BridgeWriter is destroyed, when the cache is closed, or when a callback is removed from a region using an AttributesMutator. Closes connections to BridgeServerswhen all Regionsare finished using this BridgeWriter,

Specified by:
close in interface CacheCallback
Overrides:
close in class BridgeWriter
See Also:
BridgeWriter.attach(Region), BridgeWriter.detach(Region)

isClosed

public boolean isClosed()
Deprecated. 
Returns true if this BridgeClient has been closed.

Overrides:
isClosed in class BridgeWriter

attach

public void attach(Region r)
Deprecated. 
Notify the BridgeClient that the given Region will begin delivering events to this BridgeClient. This method effects the behavior of close() and allows a single instance of BridgeClient to be safely shared with multiple Regions. This is called internally when the BridgeClient is added to a Region via AttributesFactory.setCacheWriter(CacheWriter)}

Overrides:
attach in class BridgeWriter
Parameters:
r - the Region which will begin use this BridgeWriter.
See Also:
detach(Region), close()

detach

public void detach(Region r)
Deprecated. 
Notify the BridgeClient that the given region is no longer relevant. This method is used internally during Region destruction and closure. This method effects the behavor of close() and allows a single instance of BridgeClient to be safely shared with multiple Regions.

Overrides:
detach in class BridgeWriter
Parameters:
r - the Region which will no longer use this BridgeWriter
See Also:
attach(Region), close()

init

public void init(BridgeWriter bridgeWriter)
Deprecated. 
Description copied from class: BridgeWriter
Initializes this writer from an existing BridgeWriter. This method reuses the existing BridgeWriter's proxy.

Overrides:
init in class BridgeWriter
Parameters:
bridgeWriter - The existing BridgeWriter

init

public void init(Properties p)
Deprecated. 
Description copied from class: BridgeWriter
Initializes the writer with supplied config parameters. If instantiating the writer programmatically, this method must be called with a Properties object that at a minimum contains the 'endpoints' parameter before the writer can be used. If init fails with a LicenseException, the resulting BridgeWriter will throw IllegalStateException until it is properly initialized.

Specified by:
init in interface Declarable
Overrides:
init in class BridgeWriter
Parameters:
p - configuration data such as 'endpoint' definitions

getBridgeLoader

public BridgeLoader getBridgeLoader()
Deprecated. 
Return the internally maintained BridgeLoader

Returns:
the internal BridgeLoader

toString

public String toString()
Deprecated. 
Returns a string description of the BridgeClient

Overrides:
toString in class BridgeWriter

GemFire 6.6.3

Copyright © 1997-2012 VMware, Inc. All rights reserved.