Class RemoteCacheConfigurationBuilder
- java.lang.Object
-
- org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
public class RemoteCacheConfigurationBuilder extends Object implements org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
Per-cache configuration.- Since:
- 11.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoteCacheConfigurationBuilderconfiguration(String configuration)Specifies the declarative configuration to be used to create the cache if it doesn't already exist on the server.RemoteCacheConfigurationBuilderconfigurationURI(URI uri)Specifies a URI pointing to the declarative configuration to be used to create the cache if it doesn't already exist on the server.RemoteCacheConfigurationcreate()RemoteCacheConfigurationBuilderforceReturnValues(boolean forceReturnValues)Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache.RemoteCacheConfigurationBuildernearCacheFactory(NearCacheFactory factory)Specifies aNearCacheFactorywhich is responsible for creatingNearCacheinstances.RemoteCacheConfigurationBuildernearCacheMaxEntries(int maxEntries)Specifies the maximum number of entries that will be held in the near cache.RemoteCacheConfigurationBuildernearCacheMode(NearCacheMode mode)Specifies the near caching mode.org.infinispan.commons.configuration.Builder<?>read(RemoteCacheConfiguration template)RemoteCacheConfigurationBuildertemplateName(String templateName)Specifies the name of a template to be used to create the cache if it doesn't already exist on the server.RemoteCacheConfigurationBuildertemplateName(DefaultTemplate template)Specifies one of the default templates to be used to create the cache if it doesn't already exist on the server.RemoteCacheConfigurationBuildertransactionManager(TransactionManager manager)TheTransactionManagerto use for the cacheRemoteCacheConfigurationBuildertransactionMode(TransactionMode mode)TheTransactionModein which aRemoteCachewill be enlisted.voidvalidate()ConfigurationBuilderwithProperties(Properties properties)
-
-
-
Method Detail
-
forceReturnValues
public RemoteCacheConfigurationBuilder forceReturnValues(boolean forceReturnValues)
Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache.
-
nearCacheMode
public RemoteCacheConfigurationBuilder nearCacheMode(NearCacheMode mode)
Specifies the near caching mode. SeeNearCacheModefor details on the available modes.- Parameters:
mode- one ofNearCacheMode- Returns:
- an instance of the builder
-
nearCacheMaxEntries
public RemoteCacheConfigurationBuilder nearCacheMaxEntries(int maxEntries)
Specifies the maximum number of entries that will be held in the near cache. Only works whennearCacheMode(NearCacheMode)is notNearCacheMode.DISABLED.- Parameters:
maxEntries- maximum entries in the near cache.- Returns:
- an instance of the builder
-
nearCacheFactory
public RemoteCacheConfigurationBuilder nearCacheFactory(NearCacheFactory factory)
Specifies aNearCacheFactorywhich is responsible for creatingNearCacheinstances.- Parameters:
factory- aNearCacheFactory- Returns:
- an instance of the builder
-
configuration
public RemoteCacheConfigurationBuilder configuration(String configuration)
Specifies the declarative configuration to be used to create the cache if it doesn't already exist on the server.- Parameters:
configuration- the XML representation of a cache configuration.- Returns:
- an instance of the builder
-
configurationURI
public RemoteCacheConfigurationBuilder configurationURI(URI uri)
Specifies a URI pointing to the declarative configuration to be used to create the cache if it doesn't already exist on the server.- Parameters:
uri- the URI of the configuration.- Returns:
- an instance of the builder
-
templateName
public RemoteCacheConfigurationBuilder templateName(String templateName)
Specifies the name of a template to be used to create the cache if it doesn't already exist on the server.- Parameters:
templateName- the name of the template.- Returns:
- an instance of the builder
-
templateName
public RemoteCacheConfigurationBuilder templateName(DefaultTemplate template)
Specifies one of the default templates to be used to create the cache if it doesn't already exist on the server.- Parameters:
template- the template to use- Returns:
- an instance of the builder
-
transactionMode
public RemoteCacheConfigurationBuilder transactionMode(TransactionMode mode)
TheTransactionModein which aRemoteCachewill be enlisted.- Parameters:
mode- the transaction mode- Returns:
- an instance of the builder
-
transactionManager
public RemoteCacheConfigurationBuilder transactionManager(TransactionManager manager)
TheTransactionManagerto use for the cache- Parameters:
manager- an instance of a TransactionManager- Returns:
- an instance of the builder
-
validate
public void validate()
- Specified by:
validatein interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
create
public RemoteCacheConfiguration create()
- Specified by:
createin interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
read
public org.infinispan.commons.configuration.Builder<?> read(RemoteCacheConfiguration template)
- Specified by:
readin interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
withProperties
public ConfigurationBuilder withProperties(Properties properties)
-
-