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 create table ignore errors configuration. 064 * 065 * @param createTableIgnoreErrors {@code true} to ignore create table 066 * errors, {@code false} to treat them 067 * as fatal. 068 * 069 * @return The builder. 070 */ 071 SQLStoreConfigurationBuilder createTableIgnoreErrors(final boolean createTableIgnoreErrors); 072 073 074 /** 075 * Sets the optional connection pool reference. 076 * 077 * @param cacheName The cache name for which to use its SQL store 078 * connection pool, {@code null} if not specified. 079 * 080 * @return The builder. 081 */ 082 SQLStoreConfigurationBuilder connectionPool(final String cacheName); 083 084 085 /** 086 * Sets the page limit in SQL queries to select expired records. 087 * 088 * @param pageLimit The page limit in SQL queries to select expired 089 * records. 090 * 091 * @return The page limit in SQL queries to select expired records. 092 */ 093 SQLStoreConfigurationBuilder expiredQueryPageLimit(final int pageLimit); 094}