public abstract class AbstractStoreConfigurationBuilder<T extends StoreConfiguration,S extends AbstractStoreConfigurationBuilder<T,S>> extends AbstractPersistenceConfigurationChildBuilder implements StoreConfigurationBuilder<T,S>
Modifier and Type | Field and Description |
---|---|
protected AsyncStoreConfigurationBuilder<S> |
async |
protected boolean |
fetchPersistentState |
protected boolean |
ignoreModifications |
private static org.infinispan.util.logging.Log |
log |
protected boolean |
preload |
protected java.util.Properties |
properties |
protected boolean |
purgeOnStartup |
protected boolean |
shared |
protected SingletonStoreConfigurationBuilder<S> |
singletonStore |
Constructor and Description |
---|
AbstractStoreConfigurationBuilder(PersistenceConfigurationBuilder builder) |
Modifier and Type | Method and Description |
---|---|
S |
addProperty(java.lang.String key,
java.lang.String value)
Defines a single property.
|
AsyncStoreConfigurationBuilder<S> |
async()
Configuration for the async cache store.
|
S |
fetchPersistentState(boolean b)
If true, fetch persistent state when joining a cluster.
|
S |
ignoreModifications(boolean b)
If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be
applied to the cache store.
|
S |
preload(boolean b)
If true, when the cache starts, data stored in the cache store will be pre-loaded into memory.
|
S |
properties(java.util.Properties properties) |
S |
purgeOnStartup(boolean b)
If true, purges this cache store when it starts up.
|
Builder<?> |
read(T template)
Reads the configuration from an already created configuration bean into this builder.
|
S |
shared(boolean b)
This setting should be set to true when multiple cache instances share the same cache store
(e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared
database.) Setting this to true avoids multiple cache instances writing the same modification
multiple times.
|
SingletonStoreConfigurationBuilder<S> |
singleton()
SingletonStore is a delegating cache store used for situations when only one instance in a
cluster should interact with the underlying store.
|
void |
validate()
Validate the data in this builder before building the configuration bean
|
S |
withProperties(java.util.Properties props)
Properties passed to the cache store or loader
|
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, getBuilder, indexing, invocationBatching, jmxStatistics, locking, persistence, security, sites, storeAsBinary, transaction, unsafe, versioning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, indexing, invocationBatching, jmxStatistics, locking, persistence, security, sites, storeAsBinary, transaction, unsafe, versioning
persistence
private static final org.infinispan.util.logging.Log log
protected final AsyncStoreConfigurationBuilder<S extends AbstractStoreConfigurationBuilder<T,S>> async
protected final SingletonStoreConfigurationBuilder<S extends AbstractStoreConfigurationBuilder<T,S>> singletonStore
protected boolean fetchPersistentState
protected boolean ignoreModifications
protected boolean purgeOnStartup
protected boolean shared
protected boolean preload
protected java.util.Properties properties
public AbstractStoreConfigurationBuilder(PersistenceConfigurationBuilder builder)
public AsyncStoreConfigurationBuilder<S> async()
async
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public SingletonStoreConfigurationBuilder<S> singleton()
singleton
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S fetchPersistentState(boolean b)
fetchPersistentState
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S ignoreModifications(boolean b)
ignoreModifications
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S purgeOnStartup(boolean b)
purgeOnStartup
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S properties(java.util.Properties properties)
public S addProperty(java.lang.String key, java.lang.String value)
Defines a single property. Can be used multiple times to define all needed properties, but the
full set is overridden by StoreConfigurationChildBuilder.withProperties(java.util.Properties)
.
These properties are passed directly to the cache store.
addProperty
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S withProperties(java.util.Properties props)
withProperties
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S preload(boolean b)
preload
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public S shared(boolean b)
shared
in interface StoreConfigurationChildBuilder<S extends AbstractStoreConfigurationBuilder<T,S>>
public void validate()
Builder
validate
in interface Builder<T extends StoreConfiguration>
public Builder<?> read(T template)
Builder
read
in interface Builder<T extends StoreConfiguration>
template
- the configuration from which to "clone" this config if needed.