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.

BridgeClient

load

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.

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.

close

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,

isClosed

attach

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)}

detach

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.

init

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.