Class SingleFileStoreConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.AbstractPersistenceConfigurationChildBuilder
-
- org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
-
- org.infinispan.configuration.cache.SingleFileStoreConfigurationBuilder
-
- All Implemented Interfaces:
BaseConfigurationInfo
,Builder<SingleFileStoreConfiguration>
,ConfigurationBuilderInfo
,Self<SingleFileStoreConfigurationBuilder>
,ConfigurationChildBuilder
,PersistenceConfigurationChildBuilder
,StoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
,StoreConfigurationChildBuilder<SingleFileStoreConfigurationBuilder>
public class SingleFileStoreConfigurationBuilder extends AbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder> implements ConfigurationBuilderInfo
Single file cache store configuration builder.- Since:
- 6.0
- Author:
- Galder ZamarreƱo
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationBuilder
builder
-
Fields inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder
async, attributes
-
-
Constructor Summary
Constructors Constructor Description SingleFileStoreConfigurationBuilder(PersistenceConfigurationBuilder builder)
SingleFileStoreConfigurationBuilder(PersistenceConfigurationBuilder builder, org.infinispan.commons.configuration.attributes.AttributeSet attributeSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSet
attributes()
Configuration
build()
ClusteringConfigurationBuilder
clustering()
SingleFileStoreConfiguration
create()
Create the configuration beanCustomInterceptorsConfigurationBuilder
customInterceptors()
Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptorsEncodingConfigurationBuilder
encoding()
ExpirationConfigurationBuilder
expiration()
SingleFileStoreConfigurationBuilder
fragmentationFactor(float fragmentationFactor)
The store tries to fit in a new entry into an existing entry from a free entry pool (if one is available) However, this existing free entry may be quite bigger than what is required to contain the new entry It may then make sense to split the free entry into two parts: 1.protected ConfigurationBuilder
getBuilder()
org.infinispan.commons.configuration.elements.ElementDefinition
getElementDefinition()
IndexingConfigurationBuilder
indexing()
InvocationBatchingConfigurationBuilder
invocationBatching()
SingleFileStoreConfigurationBuilder
location(String location)
Sets a location on disk where the store can write.LockingConfigurationBuilder
locking()
SingleFileStoreConfigurationBuilder
maxEntries(int maxEntries)
In order to speed up lookups, the single file cache store keeps an index of keys and their corresponding position in the file.MemoryConfigurationBuilder
memory()
PersistenceConfigurationBuilder
persistence()
Builder<?>
read(SingleFileStoreConfiguration template)
Reads the configuration from an already created configuration bean into this builder.SecurityConfigurationBuilder
security()
SingleFileStoreConfigurationBuilder
self()
boolean
simpleCache()
ConfigurationChildBuilder
simpleCache(boolean simpleCache)
SitesConfigurationBuilder
sites()
StatisticsConfigurationBuilder
statistics()
ConfigurationChildBuilder
template(boolean template)
TransactionConfigurationBuilder
transaction()
UnsafeConfigurationBuilder
unsafe()
void
validate()
Validate the data in this builder before building the configuration beanvoid
validate(GlobalConfiguration globalConfig)
-
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder
addProperty, async, fetchPersistentState, getChildrenInfo, ignoreModifications, maxBatchSize, preload, properties, purgeOnStartup, segmented, shared, toString, transactional, validate, withProperties
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationBuilderInfo
getBuilderInfo, getChildrenInfo, getNewBuilderInfo
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, customInterceptors, encoding, expiration, indexing, invocationBatching, jmxStatistics, locking, memory, security, simpleCache, simpleCache, sites, statistics, template, transaction, unsafe
-
Methods inherited from interface org.infinispan.configuration.cache.PersistenceConfigurationChildBuilder
persistence
-
-
-
-
Field Detail
-
builder
protected final ConfigurationBuilder builder
-
-
Constructor Detail
-
SingleFileStoreConfigurationBuilder
public SingleFileStoreConfigurationBuilder(PersistenceConfigurationBuilder builder)
-
SingleFileStoreConfigurationBuilder
public SingleFileStoreConfigurationBuilder(PersistenceConfigurationBuilder builder, org.infinispan.commons.configuration.attributes.AttributeSet attributeSet)
-
-
Method Detail
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Overrides:
attributes
in classAbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
- Returns:
- the
AttributeSet
declared by the configuration.
-
self
public SingleFileStoreConfigurationBuilder self()
- Specified by:
self
in interfaceSelf<SingleFileStoreConfigurationBuilder>
-
location
public SingleFileStoreConfigurationBuilder location(String location)
Sets a location on disk where the store can write.
-
maxEntries
public SingleFileStoreConfigurationBuilder maxEntries(int maxEntries)
In order to speed up lookups, the single file cache store keeps an index of keys and their corresponding position in the file. To avoid this index resulting in memory consumption problems, this cache store can bounded by a maximum number of entries that it stores. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. So, setting a maximum limit only makes sense when Infinispan is used as a cache, whose contents can be recomputed or they can be retrieved from the authoritative data store. If this maximum limit is set when the Infinispan is used as an authoritative data store, it could lead to data loss, and hence it's not recommended for this use case.
-
fragmentationFactor
public SingleFileStoreConfigurationBuilder fragmentationFactor(float fragmentationFactor)
The store tries to fit in a new entry into an existing entry from a free entry pool (if one is available) However, this existing free entry may be quite bigger than what is required to contain the new entry It may then make sense to split the free entry into two parts: 1. That is required to contain the new entry requested 2. the remaining part to be returned to the pool of free entries. The fragmentationFactor decides when to split the free entry. So, if this value is set as 0.75, then the free entry will be split if the new entry is equal to or less than 0.75 times the size of free entry
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<SingleFileStoreConfiguration>
- Overrides:
validate
in classAbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
-
validate
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validate
in interfaceConfigurationChildBuilder
- Overrides:
validate
in classAbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
-
create
public SingleFileStoreConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<SingleFileStoreConfiguration>
- Returns:
-
read
public Builder<?> read(SingleFileStoreConfiguration template)
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<SingleFileStoreConfiguration>
- Overrides:
read
in classAbstractStoreConfigurationBuilder<SingleFileStoreConfiguration,SingleFileStoreConfigurationBuilder>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
template
public ConfigurationChildBuilder template(boolean template)
- Specified by:
template
in interfaceConfigurationChildBuilder
-
simpleCache
public ConfigurationChildBuilder simpleCache(boolean simpleCache)
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
clustering
public ClusteringConfigurationBuilder clustering()
- Specified by:
clustering
in interfaceConfigurationChildBuilder
-
customInterceptors
@Deprecated public CustomInterceptorsConfigurationBuilder customInterceptors()
Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptors- Specified by:
customInterceptors
in interfaceConfigurationChildBuilder
-
encoding
public EncodingConfigurationBuilder encoding()
- Specified by:
encoding
in interfaceConfigurationChildBuilder
-
expiration
public ExpirationConfigurationBuilder expiration()
- Specified by:
expiration
in interfaceConfigurationChildBuilder
-
indexing
public IndexingConfigurationBuilder indexing()
- Specified by:
indexing
in interfaceConfigurationChildBuilder
-
invocationBatching
public InvocationBatchingConfigurationBuilder invocationBatching()
- Specified by:
invocationBatching
in interfaceConfigurationChildBuilder
-
statistics
public StatisticsConfigurationBuilder statistics()
- Specified by:
statistics
in interfaceConfigurationChildBuilder
-
persistence
public PersistenceConfigurationBuilder persistence()
- Specified by:
persistence
in interfaceConfigurationChildBuilder
-
locking
public LockingConfigurationBuilder locking()
- Specified by:
locking
in interfaceConfigurationChildBuilder
-
security
public SecurityConfigurationBuilder security()
- Specified by:
security
in interfaceConfigurationChildBuilder
-
transaction
public TransactionConfigurationBuilder transaction()
- Specified by:
transaction
in interfaceConfigurationChildBuilder
-
unsafe
public UnsafeConfigurationBuilder unsafe()
- Specified by:
unsafe
in interfaceConfigurationChildBuilder
-
sites
public SitesConfigurationBuilder sites()
- Specified by:
sites
in interfaceConfigurationChildBuilder
-
memory
public MemoryConfigurationBuilder memory()
- Specified by:
memory
in interfaceConfigurationChildBuilder
-
getBuilder
protected ConfigurationBuilder getBuilder()
-
build
public Configuration build()
- Specified by:
build
in interfaceConfigurationChildBuilder
-
-