Class AbstractSegmentedStoreConfiguration<T extends AbstractStoreConfiguration>
- java.lang.Object
-
- org.infinispan.configuration.cache.AbstractStoreConfiguration
-
- org.infinispan.configuration.cache.AbstractSegmentedStoreConfiguration<T>
-
- All Implemented Interfaces:
StoreConfiguration
- Direct Known Subclasses:
SingleFileStoreConfiguration
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
attributes, FETCH_PERSISTENT_STATE, IGNORE_MODIFICATIONS, MAX_BATCH_SIZE, PRELOAD, PROPERTIES, PURGE_ON_STARTUP, SEGMENTED, SHARED, TRANSACTIONAL
-
-
Constructor Summary
Constructors Constructor Description AbstractSegmentedStoreConfiguration(AttributeSet attributes, AsyncStoreConfiguration async, SingletonStoreConfiguration singletonStore)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static String
fileLocationTransform(String location, int segment)
Transforms a file location to a segment based one.abstract T
newConfigurationFrom(int segment)
Method that is invoked each time a new store is created for a segment.-
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfiguration
async, attributeDefinitionSet, attributes, equals, fetchPersistentState, hashCode, ignoreModifications, maxBatchSize, preload, properties, purgeOnStartup, segmented, shared, singletonStore, toString, transactional
-
-
-
-
Constructor Detail
-
AbstractSegmentedStoreConfiguration
public AbstractSegmentedStoreConfiguration(AttributeSet attributes, AsyncStoreConfiguration async, SingletonStoreConfiguration singletonStore)
-
-
Method Detail
-
newConfigurationFrom
public abstract T newConfigurationFrom(int segment)
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
-
fileLocationTransform
protected static String fileLocationTransform(String location, int segment)
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 preseve 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
-
-