Class AbstractSegmentedStoreConfiguration<T extends AbstractStoreConfiguration>
java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement
org.infinispan.configuration.cache.AbstractStoreConfiguration
org.infinispan.configuration.cache.AbstractSegmentedStoreConfiguration<T>
- All Implemented Interfaces:
Matchable
,Updatable
,StoreConfiguration
public abstract class AbstractSegmentedStoreConfiguration<T extends AbstractStoreConfiguration>
extends AbstractStoreConfiguration
Abstract store configuration that should be extended when the store configuration supports being segmented.
- Since:
- 9.4
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.configuration.cache.AbstractStoreConfiguration
MAX_BATCH_SIZE, PRELOAD, PROPERTIES, PURGE_ON_STARTUP, READ_ONLY, SEGMENTED, SHARED, TRANSACTIONAL, WRITE_ONLY
Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, CHILDLESS, children, element, repeated
-
Constructor Summary
ConstructorDescriptionAbstractSegmentedStoreConfiguration
(Enum<?> element, AttributeSet attributes, AsyncStoreConfiguration async) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
fileLocationTransform
(String location, int segment) Transforms a file location to a segment based one.newConfigurationFrom
(int segment) Deprecated, for removal: This API element is subject to removal in a future version.newConfigurationFrom
(int segment, InitializationContext ctx) Same asnewConfigurationFrom(int)
except that you can utilize the intialization context when initializing the segmented store object.Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfiguration
async, attributeDefinitionSet, fetchPersistentState, ignoreModifications, maxBatchSize, preload, properties, purgeOnStartup, segmented, shared, transactional, writeOnly
Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.configuration.cache.StoreConfiguration
attributes
-
Constructor Details
-
AbstractSegmentedStoreConfiguration
public AbstractSegmentedStoreConfiguration(Enum<?> element, AttributeSet attributes, AsyncStoreConfiguration async)
-
-
Method Details
-
newConfigurationFrom
Deprecated, for removal: This API element is subject to removal in a future version.since 10.0 - please implementnewConfigurationFrom(int, InitializationContext)
.Method that is invoked each time a new store is created for a segment. This method should return a new configuration that is configured to be persisted using the given segment.- Parameters:
segment
- the segment to use- Returns:
- the newly created configuration
-
newConfigurationFrom
Same asnewConfigurationFrom(int)
except that you can utilize the intialization context when initializing the segmented store object. This method- Parameters:
segment
- the segment to usectx
- the initialization context from the persistence layer- Returns:
- the newly created configuration
-
fileLocationTransform
Transforms a file location to a segment based one. This is useful for file based stores where all you need to do is append a segment to the name of the directory. If the provided location is a directory, that is that it is terminated by inFile.separatorChar
, it will add a new directory onto that that is the segment. If the location is a file, that is that it is not terminated byFile.separatorChar
, this will treat the location as a directory and append a segment file in it. The underlying store may or may not preserve this and could still turn the segment into a directory.- Parameters:
location
- original file locationsegment
- the segment to append- Returns:
- string with the segment appended to the file location
-
newConfigurationFrom(int, InitializationContext)
.