K - The type of keys handled by this loader.V - The type of values generated by this loader.public class CacheJdbcPojoStore<K,V> extends CacheAbstractJdbcStore<K,V>
CacheStore backed by JDBC and POJO via reflection.
This implementation stores objects in underlying database using java beans mapping description via reflection.| Modifier and Type | Class and Description |
|---|---|
protected static class |
CacheJdbcPojoStore.PojoMethodsCache
POJO methods cache.
|
CacheAbstractJdbcStore.EntryMapping| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Map<String,CacheJdbcPojoStore.PojoMethodsCache>> |
mtdsCache
Methods cache.
|
ATTR_CONN_PROP, cacheMappings, dataSrc, DFLT_BATCH_SIZE, DFLT_PARALLEL_LOAD_CACHE_MINIMUM_THRESHOLD, dialect, EMPTY_COLUMN_VALUE, log, MAX_ATTEMPT_WRITE_COUNT| Constructor and Description |
|---|
CacheJdbcPojoStore() |
| Modifier and Type | Method and Description |
|---|---|
protected <R> R |
buildObject(String cacheName,
String typeName,
Collection<CacheTypeFieldMetadata> fields,
Map<String,Integer> loadColIdxs,
ResultSet rs)
Construct object from query result.
|
protected Object |
extractParameter(String cacheName,
String typeName,
String fieldName,
Object obj)
Get field value from object for use as query parameter.
|
protected Object |
keyTypeId(Object key)
Extract key type id from key object.
|
protected Object |
keyTypeId(String type)
Extract key type id from key class name.
|
protected void |
prepareBuilders(String cacheName,
Collection<CacheTypeMetadata> types)
Prepare internal store specific builders for provided types metadata.
|
closeConnection, connection, delete, deleteAll, end, fillKeyParameters, fillKeyParameters, fillParameter, fillValueParameters, getBatchSize, getColumnValue, getDataSource, getDialect, getMaximumPoolSize, getParallelLoadCacheMinimumThreshold, ignite, load, loadAll, loadCache, openConnection, resolveDialect, session, sessionEnd, setBatchSize, setDataSource, setDialect, setMaximumPoolSize, setParallelLoadCacheMinimumThreshold, simpleType, start, stop, write, writeAllprotected volatile Map<String,Map<String,CacheJdbcPojoStore.PojoMethodsCache>> mtdsCache
protected void prepareBuilders(@Nullable String cacheName, Collection<CacheTypeMetadata> types) throws javax.cache.CacheException
prepareBuilders in class CacheAbstractJdbcStore<K,V>types - Collection of types.javax.cache.CacheException - If failed to prepare internal builders for types.protected <R> R buildObject(String cacheName, String typeName, Collection<CacheTypeFieldMetadata> fields, Map<String,Integer> loadColIdxs, ResultSet rs) throws javax.cache.integration.CacheLoaderException
buildObject in class CacheAbstractJdbcStore<K,V>R - Type of result object.cacheName - Cache name.typeName - Type name.fields - Fields descriptors.loadColIdxs - Select query columns index.rs - ResultSet.javax.cache.integration.CacheLoaderException - If failed to construct cache object.@Nullable protected Object extractParameter(String cacheName, String typeName, String fieldName, Object obj) throws javax.cache.CacheException
extractParameter in class CacheAbstractJdbcStore<K,V>cacheName - Cache name.typeName - Type name.fieldName - Field name.obj - Cache object.javax.cache.CacheExceptionprotected Object keyTypeId(Object key) throws javax.cache.CacheException
keyTypeId in class CacheAbstractJdbcStore<K,V>key - Key object.javax.cache.CacheException - If failed to get type key id from object.protected Object keyTypeId(String type) throws javax.cache.CacheException
keyTypeId in class CacheAbstractJdbcStore<K,V>type - String description of key type.javax.cache.CacheException - If failed to get type key id from object.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015