Package org.gridgain.cache.store.jdbc
Class JdbcTupleCacheStore
java.lang.Object
org.gridgain.cache.store.jdbc.JdbcCacheStore<Tuple,Tuple>
org.gridgain.cache.store.jdbc.JdbcTupleCacheStore
- All Implemented Interfaces:
CacheStore<Tuple,Tuple>
JDBC cache store which is working with tuples.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gridgain.cache.store.jdbc.JdbcCacheStore
JdbcCacheStore.EntryMapping, JdbcCacheStore.TypeKind -
Field Summary
Fields inherited from class org.gridgain.cache.store.jdbc.JdbcCacheStore
dialect -
Method Summary
Modifier and TypeMethodDescriptionprotected <R> RbuildObject(String typeName, JdbcCacheStore.TypeKind typeKind, JdbcTypeField[] fields, Map<String, Integer> loadColIndexes, ResultSet rs) Construct object from query result.protected @Nullable ObjectextractParameter(String typeName, JdbcCacheStore.TypeKind typeKind, String fieldName, Object obj) Get field value from object for use as query parameter.protected JdbcCacheStore.TypeKindkindForName(String type) Get type kind by name.protected voidprepareBuilders(JdbcType types) Prepare internal store specific builders for provided types metadata.toString()Methods inherited from class org.gridgain.cache.store.jdbc.JdbcCacheStore
beginSession, columnIndex, deleteAllAsync, deleteAsync, fillKeyParameters, fillKeyParameters, fillParameter, fillValueParameters, getBatchSize, getDataSource, getDialect, getExecutor, getMaximumWriteAttempts, getParallelLoadCacheMinimumThreshold, getTransformer, getType, isSqlEscapeAll, loadAllAsync, loadAsync, loadCacheAsync, setBatchSize, setDataSource, setDialect, setExecutor, setMaximumWriteAttempts, setParallelLoadCacheMinimumThreshold, setSqlEscapeAll, setTransformer, setType, writeAllAsync, writeAsync
-
Method Details
-
extractParameter
@Nullable protected @Nullable Object extractParameter(String typeName, JdbcCacheStore.TypeKind typeKind, String fieldName, Object obj) throws IgniteException Description copied from class:JdbcCacheStoreGet field value from object for use as query parameter.- Specified by:
extractParameterin classJdbcCacheStore<Tuple,Tuple> - Parameters:
typeName- Type name.typeKind- Type kind.fieldName- Field name.obj- Cache object.- Returns:
- Field value from object.
- Throws:
IgniteException- in case of error.
-
buildObject
protected <R> R buildObject(String typeName, JdbcCacheStore.TypeKind typeKind, JdbcTypeField[] fields, Map<String, Integer> loadColIndexes, ResultSet rs) throws IgniteExceptionDescription copied from class:JdbcCacheStoreConstruct object from query result.- Specified by:
buildObjectin classJdbcCacheStore<Tuple,Tuple> - Type Parameters:
R- Type of result object.- Parameters:
typeName- Type name.typeKind- Type kind.fields- Fields descriptors.loadColIndexes- Select query columns index.rs- ResultSet.- Returns:
- Constructed object.
- Throws:
IgniteException- If failed to construct cache object.
-
prepareBuilders
Prepare internal store specific builders for provided types metadata.- Specified by:
prepareBuildersin classJdbcCacheStore<Tuple,Tuple> - Parameters:
types- The type.- Throws:
IgniteException- If failed to prepare internal builders for types.
-
toString
-
kindForName
Get type kind by name.- Specified by:
kindForNamein classJdbcCacheStore<Tuple,Tuple> - Parameters:
type- Type name to check.- Returns:
Trueif class not found.
-