Class RestStoreConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.AbstractPersistenceConfigurationChildBuilder
-
- org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder>
-
- org.infinispan.persistence.rest.configuration.RestStoreConfigurationBuilder
-
- All Implemented Interfaces:
BaseConfigurationInfo
,Builder<RestStoreConfiguration>
,ConfigurationBuilderInfo
,Self<RestStoreConfigurationBuilder>
,ConfigurationChildBuilder
,PersistenceConfigurationChildBuilder
,StoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder>
,StoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
,RestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
public class RestStoreConfigurationBuilder extends AbstractStoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder> implements RestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>, ConfigurationBuilderInfo
RestStoreConfigurationBuilder. Configures aRestStore
- Since:
- 6.0
- Author:
- Tristan Tarrant
-
-
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 RestStoreConfigurationBuilder(PersistenceConfigurationBuilder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSet
attributes()
Configuration
build()
RestStoreConfigurationBuilder
cacheName(String cacheName)
The cache name of the remote REST endpoint.ClusteringConfigurationBuilder
clustering()
ConnectionPoolConfigurationBuilder
connectionPool()
Configures the connection poolRestStoreConfiguration
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()
protected ConfigurationBuilder
getBuilder()
Collection<ConfigurationBuilderInfo>
getChildrenInfo()
org.infinispan.commons.configuration.elements.ElementDefinition
getElementDefinition()
RestStoreConfigurationBuilder
host(String host)
The host to connect toIndexingConfigurationBuilder
indexing()
InvocationBatchingConfigurationBuilder
invocationBatching()
RestStoreConfigurationBuilder
key2StringMapper(Class<? extends org.infinispan.persistence.keymappers.MarshallingTwoWayKey2StringMapper> klass)
The class of aKey2StringMapper
to use for mapping keys to strings suitable for RESTful retrieval/storage.RestStoreConfigurationBuilder
key2StringMapper(String key2StringMapper)
The class name of aKey2StringMapper
to use for mapping keys to strings suitable for RESTful retrieval/storage.LockingConfigurationBuilder
locking()
RestStoreConfigurationBuilder
maxContentLength(int maxContentLength)
Sets the maximum content length.MemoryConfigurationBuilder
memory()
RestStoreConfigurationBuilder
metadataHelper(Class<? extends org.infinispan.persistence.rest.metadata.MetadataHelper> metadataHelper)
The class of aMetadataHelper
to use for managing appropriate metadata for the entries Defaults toEmbeddedMetadataHelper
RestStoreConfigurationBuilder
metadataHelper(String metadataHelper)
The class name of aMetadataHelper
to use for managing appropriate metadata for the entries Defaults toEmbeddedMetadataHelper
PersistenceConfigurationBuilder
persistence()
RestStoreConfigurationBuilder
port(int port)
The port to connect to.RestStoreConfigurationBuilder
rawValues(boolean rawValues)
Reads/writes "raw" values to the REST server instead of marshalling (used by the rolling upgrades feature)RestStoreConfigurationBuilder
read(RestStoreConfiguration template)
Reads the configuration from an already created configuration bean into this builder.SecurityConfigurationBuilder
security()
RestStoreConfigurationBuilder
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 bean-
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder
addProperty, async, fetchPersistentState, ignoreModifications, maxBatchSize, preload, properties, purgeOnStartup, segmented, shared, toString, transactional, validate, validate, withProperties
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationBuilderInfo
getBuilderInfo, 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, validate
-
Methods inherited from interface org.infinispan.configuration.cache.PersistenceConfigurationChildBuilder
persistence
-
Methods inherited from interface org.infinispan.configuration.cache.StoreConfigurationChildBuilder
addProperty, async, fetchPersistentState, ignoreModifications, maxBatchSize, preload, purgeOnStartup, segmented, shared, transactional, withProperties
-
-
-
-
Field Detail
-
builder
protected final ConfigurationBuilder builder
-
-
Constructor Detail
-
RestStoreConfigurationBuilder
public RestStoreConfigurationBuilder(PersistenceConfigurationBuilder builder)
-
-
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<RestStoreConfiguration,RestStoreConfigurationBuilder>
- Returns:
- the
AttributeSet
declared by the configuration.
-
getChildrenInfo
public Collection<ConfigurationBuilderInfo> getChildrenInfo()
- Specified by:
getChildrenInfo
in interfaceConfigurationBuilderInfo
- Overrides:
getChildrenInfo
in classAbstractStoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder>
- Returns:
- a collection of
ConfigurationBuilderInfo
for the sub-elements of the builder.
-
self
public RestStoreConfigurationBuilder self()
- Specified by:
self
in interfaceSelf<RestStoreConfigurationBuilder>
-
connectionPool
public ConnectionPoolConfigurationBuilder connectionPool()
Description copied from interface:RestStoreConfigurationChildBuilder
Configures the connection pool- Specified by:
connectionPool
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
host
public RestStoreConfigurationBuilder host(String host)
Description copied from interface:RestStoreConfigurationChildBuilder
The host to connect to- Specified by:
host
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
key2StringMapper
public RestStoreConfigurationBuilder key2StringMapper(String key2StringMapper)
Description copied from interface:RestStoreConfigurationChildBuilder
The class name of aKey2StringMapper
to use for mapping keys to strings suitable for RESTful retrieval/storage. Defaults toWrappedByteArrayOrPrimitiveMapper
- Specified by:
key2StringMapper
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
key2StringMapper
public RestStoreConfigurationBuilder key2StringMapper(Class<? extends org.infinispan.persistence.keymappers.MarshallingTwoWayKey2StringMapper> klass)
Description copied from interface:RestStoreConfigurationChildBuilder
The class of aKey2StringMapper
to use for mapping keys to strings suitable for RESTful retrieval/storage. Defaults toWrappedByteArrayOrPrimitiveMapper
- Specified by:
key2StringMapper
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
metadataHelper
public RestStoreConfigurationBuilder metadataHelper(String metadataHelper)
Description copied from interface:RestStoreConfigurationChildBuilder
The class name of aMetadataHelper
to use for managing appropriate metadata for the entries Defaults toEmbeddedMetadataHelper
- Specified by:
metadataHelper
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
metadataHelper
public RestStoreConfigurationBuilder metadataHelper(Class<? extends org.infinispan.persistence.rest.metadata.MetadataHelper> metadataHelper)
Description copied from interface:RestStoreConfigurationChildBuilder
The class of aMetadataHelper
to use for managing appropriate metadata for the entries Defaults toEmbeddedMetadataHelper
- Specified by:
metadataHelper
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
cacheName
public RestStoreConfigurationBuilder cacheName(String cacheName)
Description copied from interface:RestStoreConfigurationChildBuilder
The cache name of the remote REST endpoint.- Specified by:
cacheName
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
port
public RestStoreConfigurationBuilder port(int port)
Description copied from interface:RestStoreConfigurationChildBuilder
The port to connect to. Defaults to 80- Specified by:
port
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
rawValues
public RestStoreConfigurationBuilder rawValues(boolean rawValues)
Description copied from interface:RestStoreConfigurationChildBuilder
Reads/writes "raw" values to the REST server instead of marshalling (used by the rolling upgrades feature)- Specified by:
rawValues
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
maxContentLength
public RestStoreConfigurationBuilder maxContentLength(int maxContentLength)
Description copied from interface:RestStoreConfigurationChildBuilder
Sets the maximum content length. Defaults to 10M.- Specified by:
maxContentLength
in interfaceRestStoreConfigurationChildBuilder<RestStoreConfigurationBuilder>
-
create
public RestStoreConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<RestStoreConfiguration>
- Returns:
-
read
public RestStoreConfigurationBuilder read(RestStoreConfiguration 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<RestStoreConfiguration>
- Overrides:
read
in classAbstractStoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
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<RestStoreConfiguration>
- Overrides:
validate
in classAbstractStoreConfigurationBuilder<RestStoreConfiguration,RestStoreConfigurationBuilder>
-
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
-
-