Package org.apache.geode.connectors.jdbc
Class JdbcLoader<K,V>
java.lang.Object
org.apache.geode.connectors.jdbc.internal.AbstractJdbcCallback
org.apache.geode.connectors.jdbc.JdbcLoader<K,V>
- All Implemented Interfaces:
CacheCallback,CacheLoader<K,,V> Declarable
@Experimental
public class JdbcLoader<K,V>
extends org.apache.geode.connectors.jdbc.internal.AbstractJdbcCallback
implements CacheLoader<K,V>
This class provides loading from a data source using JDBC.
- Since:
- Geode 1.4
-
Field Summary
Fields inherited from class org.apache.geode.connectors.jdbc.internal.AbstractJdbcCallback
cache -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.geode.connectors.jdbc.internal.AbstractJdbcCallback
checkInitialized, eventCanBeIgnored, getSqlHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.geode.cache.CacheCallback
closeMethods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Constructor Details
-
JdbcLoader
public JdbcLoader()
-
-
Method Details
-
load
Description copied from interface:CacheLoaderLoads 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 ofRegion.get(Object, Object)that triggered this load.- Specified by:
loadin interfaceCacheLoader<K,V> - Parameters:
helper- a LoaderHelper object that is passed in from cache service and provides access to the key, region, argument, andnetSearch.- Returns:
- this method always returns a PdxInstance. It does not matter what the V generic parameter is set to.
- Throws:
CacheLoaderException- if an error occurs. This exception or any other exception thrown by this method will be propagated back to the application from the get method.- See Also:
-