001package com.nimbusds.infinispan.persistence.sql.config; 002 003 004import org.infinispan.configuration.cache.StoreConfigurationChildBuilder; 005import org.jooq.SQLDialect; 006 007 008/** 009 * SQL store configuration child builder. 010 */ 011public interface SQLStoreConfigurationChildBuilder<S> extends StoreConfigurationChildBuilder<S> { 012 013 014 /** 015 * Sets the class for transforming between Infinispan entries (key / 016 * value pair and optional metadata) and a corresponding SQL record. 017 * 018 * @param recordTransformerClass The record transformer class. Must not 019 * be {@code null}. 020 * 021 * @return The builder. 022 */ 023 SQLStoreConfigurationBuilder recordTransformerClass(final Class recordTransformerClass); 024 025 026 /** 027 * Sets the optional class for executing direct SQL queries against the 028 * database. 029 * 030 * @param queryExecutorClass The query executor class, {@code null} if 031 * not specified. 032 * 033 * @return The builder. 034 */ 035 SQLStoreConfigurationBuilder queryExecutorClass(final Class queryExecutorClass); 036 037 038 /** 039 * Sets the preferred SQL dialect. 040 * 041 * @param sqlDialect The preferred SQL dialect. Must not be 042 * {@code null}. 043 * 044 * @return The builder. 045 */ 046 SQLStoreConfigurationBuilder sqlDialect(final SQLDialect sqlDialect); 047 048 049 /** 050 * Sets the optional create table if missing configuration. 051 * 052 * @param createTableIfMissing {@code true} to create the underlying 053 * SQL table(s) if they are missing (the 054 * default setting), {@code false} to skip 055 * this check. 056 * 057 * @return The builder. 058 */ 059 SQLStoreConfigurationBuilder createTableIfMissing(final boolean createTableIfMissing); 060 061 062 /** 063 * Sets the optional connection pool reference. 064 * 065 * @param cacheName The cache name for which to use its SQL store 066 * connection pool, {@code null} if not specified. 067 * 068 * @return The builder. 069 */ 070 SQLStoreConfigurationBuilder connectionPool(final String cacheName); 071}