public enum ConfigurationParameters extends Enum<ConfigurationParameters>
insert, find and delete are prepared before-hand for each entity class. For update and all operations with timestamp, since the updated fields and timestamp value are only known at runtime, Achilless will prepare the statements only on the fly and save them into a Guava LRU cache.
The default size is 10000 entries. Once the limit is reached, oldest prepared statements are evicted, causing Achilles to re-prepare them and get warnings from the Java Driver.
You can get details on the LRU cache state by putting the logger info.archinnov.achilles.internal.statement.cache.CacheManager on DEBUG
StatementsCache
to store all prepared statements. This option is useful for unit testing to avoid re-preparing many times the same prepared statements
InsertStrategy.ALL_FIELDS and InsertStrategy.NOT_NULL_FIELDS.
Default value is ConfigurationParameters.InsertStrategy.ALL_FIELDS.
For more details, please check Insert Strategy
NamingStrategy.LOWER_CASE, NamingStrategy.SNAKE_CASE and NamingStrategy.CASE_SENSITIVE.
Default value is NamingStrategy.LOWER_CASE.
For more details, please check Naming Strategy
BeanFactory
The default implementation is straightforward
@Override
public T newInstance(Class clazz) {
try{
return clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
....
}
}
new ThreadPoolExecutor(5, 20, 60, TimeUnit.SECONDS,
new LinkedBlockingQueue(1000),
new DefaultExecutorThreadFactory())
new ThreadPoolExecutor(DEFAULT_EXECUTOR_SERVICE_MIN_THREAD, 20, 60, TimeUnit.SECONDS,
new LinkedBlockingQueue(1000),
new DefaultExecutorThreadFactory())
new ThreadPoolExecutor(5, DEFAULT_EXECUTOR_SERVICE_MAX_THREAD, 60, TimeUnit.SECONDS,
new LinkedBlockingQueue(1000),
new DefaultExecutorThreadFactory())
new ThreadPoolExecutor(5, 20, DEFAULT_EXECUTOR_SERVICE_THREAD_KEEPALIVE, TimeUnit.SECONDS,
new LinkedBlockingQueue(1000),
new DefaultExecutorThreadFactory())
new ThreadPoolExecutor(5, 20, 60, TimeUnit.SECONDS,
new LinkedBlockingQueue(DEFAULT_EXECUTOR_SERVICE_QUEUE_SIZE),
new DefaultExecutorThreadFactory())
new ThreadPoolExecutor(5, 20, 60, TimeUnit.SECONDS,
new LinkedBlockingQueue(1000),
DEFAULT_EXECUTOR_SERVICE_THREAD_FACTORY)
For more details, please check Asynchronous Operations
| Modifier and Type | Method and Description |
|---|---|
static ConfigurationParameters |
fromLabel(String label)
Small utility method that resolves a configuration based on its label.
|
static ConfigurationParameters |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConfigurationParameters[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConfigurationParameters NATIVE_SESSION
public static final ConfigurationParameters KEYSPACE_NAME
public static final ConfigurationParameters JACKSON_MAPPER_FACTORY
public static final ConfigurationParameters JACKSON_MAPPER
public static final ConfigurationParameters CONSISTENCY_LEVEL_READ_DEFAULT
public static final ConfigurationParameters CONSISTENCY_LEVEL_WRITE_DEFAULT
public static final ConfigurationParameters CONSISTENCY_LEVEL_SERIAL_DEFAULT
public static final ConfigurationParameters CONSISTENCY_LEVEL_READ_MAP
public static final ConfigurationParameters CONSISTENCY_LEVEL_WRITE_MAP
public static final ConfigurationParameters CONSISTENCY_LEVEL_SERIAL_MAP
public static final ConfigurationParameters EVENT_INTERCEPTORS
public static final ConfigurationParameters FORCE_SCHEMA_GENERATION
public static final ConfigurationParameters VALIDATE_SCHEMA
public static final ConfigurationParameters MANAGED_ENTITIES
public static final ConfigurationParameters BEAN_VALIDATION_ENABLE
public static final ConfigurationParameters POST_LOAD_BEAN_VALIDATION_ENABLE
public static final ConfigurationParameters BEAN_VALIDATION_VALIDATOR
public static final ConfigurationParameters PREPARED_STATEMENTS_CACHE_SIZE
public static final ConfigurationParameters DEFAULT_BEAN_FACTORY
public static final ConfigurationParameters GLOBAL_INSERT_STRATEGY
public static final ConfigurationParameters GLOBAL_NAMING_STRATEGY
public static final ConfigurationParameters SCHEMA_NAME_PROVIDER
public static final ConfigurationParameters EXECUTOR_SERVICE
public static final ConfigurationParameters STATEMENTS_CACHE
public static final ConfigurationParameters RUNTIME_CODECS
public static final ConfigurationParameters DEFAULT_EXECUTOR_SERVICE_MIN_THREAD
public static final ConfigurationParameters DEFAULT_EXECUTOR_SERVICE_MAX_THREAD
public static final ConfigurationParameters DEFAULT_EXECUTOR_SERVICE_THREAD_KEEPALIVE
public static final ConfigurationParameters DEFAULT_EXECUTOR_SERVICE_QUEUE_SIZE
public static final ConfigurationParameters DEFAULT_EXECUTOR_SERVICE_THREAD_FACTORY
public static final ConfigurationParameters DML_RESULTS_DISPLAY_SIZE
public static ConfigurationParameters[] values()
for (ConfigurationParameters c : ConfigurationParameters.values()) System.out.println(c);
public static ConfigurationParameters valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static ConfigurationParameters fromLabel(String label)
label - the configuration label that would be populated in the map.Copyright © 2012-2021. All Rights Reserved.