public final class ConfigurationBuilder extends CoreConfigurationBuilder<ConfigurationBuilder>
ConfigurationBuilder
enables building Configuration
s using a fluent style.Modifier | Constructor and Description |
---|---|
protected |
ConfigurationBuilder() |
protected |
ConfigurationBuilder(ConfigurationBuilder builder,
java.lang.ClassLoader classLoader) |
protected |
ConfigurationBuilder(ConfigurationBuilder builder,
java.util.Collection<ServiceCreationConfiguration<?,?>> serviceConfigurations) |
protected |
ConfigurationBuilder(ConfigurationBuilder builder,
java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches) |
Modifier and Type | Method and Description |
---|---|
ConfigurationBuilder |
addCache(java.lang.String alias,
CacheConfiguration<?,?> config)
Deprecated.
|
ConfigurationBuilder |
addService(ServiceCreationConfiguration<?,?> serviceConfiguration)
Deprecated.
|
boolean |
containsCache(java.lang.String alias)
Deprecated.
in favor of
CoreConfigurationBuilder.getCache(String) |
protected ConfigurationBuilder |
newBuilderWith(java.lang.ClassLoader classLoader) |
protected ConfigurationBuilder |
newBuilderWith(java.util.Collection<ServiceCreationConfiguration<?,?>> serviceConfigurations) |
protected ConfigurationBuilder |
newBuilderWith(java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches) |
static ConfigurationBuilder |
newConfigurationBuilder()
Create a new 'empty' configuration builder.
|
static ConfigurationBuilder |
newConfigurationBuilder(Configuration seed)
Create a configuration builder seeded from the given configuration.
|
ConfigurationBuilder |
removeCache(java.lang.String alias)
Deprecated.
in favor of
CoreConfigurationBuilder.withoutCache(String) |
ConfigurationBuilder |
removeService(ServiceCreationConfiguration<?,?> serviceConfiguration)
Deprecated.
|
build, getCache, getClassLoader, getServices, updateCache, updateCaches, updateServices, withCache, withClassLoader, withDefaultClassLoader, withoutCache, withoutServices, withService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getService, withCache, withoutServices, withService
protected ConfigurationBuilder()
protected ConfigurationBuilder(ConfigurationBuilder builder, java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches)
protected ConfigurationBuilder(ConfigurationBuilder builder, java.util.Collection<ServiceCreationConfiguration<?,?>> serviceConfigurations)
protected ConfigurationBuilder(ConfigurationBuilder builder, java.lang.ClassLoader classLoader)
public static ConfigurationBuilder newConfigurationBuilder()
public static ConfigurationBuilder newConfigurationBuilder(Configuration seed)
Calling CoreConfigurationBuilder.build()
on the returned builder will produce a functionally equivalent configuration to
seed
.
seed
- configuration to duplicate@Deprecated public ConfigurationBuilder addCache(java.lang.String alias, CacheConfiguration<?,?> config) throws java.lang.IllegalArgumentException
CoreConfigurationBuilder.withCache(String, CacheConfiguration)
If a cache with the given alias already exists then an IllegalArgumentException
will be thrown.
alias
- cache alias to be addedconfig
- cache configurationjava.lang.IllegalArgumentException
@Deprecated public ConfigurationBuilder removeCache(java.lang.String alias)
CoreConfigurationBuilder.withoutCache(String)
alias
- cache alias to be removed@Deprecated public ConfigurationBuilder addService(ServiceCreationConfiguration<?,?> serviceConfiguration)
CoreConfigurationBuilder.withService(ServiceCreationConfiguration)
If a a service creation configuration of the same concrete type is already present then an IllegalArgumentException
will be thrown.
serviceConfiguration
- service creation configuration@Deprecated public ConfigurationBuilder removeService(ServiceCreationConfiguration<?,?> serviceConfiguration)
FluentConfigurationBuilder.withoutServices(Class)
or CoreConfigurationBuilder.withoutServices(Class, Predicate)
serviceConfiguration
- service creation configuration@Deprecated public boolean containsCache(java.lang.String alias)
CoreConfigurationBuilder.getCache(String)
true
if a cache configuration is associated with the given alias.alias
- cache configuration aliastrue
if the given alias is presentprotected ConfigurationBuilder newBuilderWith(java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches)
newBuilderWith
in class CoreConfigurationBuilder<ConfigurationBuilder>
protected ConfigurationBuilder newBuilderWith(java.util.Collection<ServiceCreationConfiguration<?,?>> serviceConfigurations)
newBuilderWith
in class CoreConfigurationBuilder<ConfigurationBuilder>
protected ConfigurationBuilder newBuilderWith(java.lang.ClassLoader classLoader)
newBuilderWith
in class CoreConfigurationBuilder<ConfigurationBuilder>