Class RemoteCacheConfigurationBuilder
java.lang.Object
org.infinispan.client.hotrod.configuration.RemoteCacheConfigurationBuilder
- All Implemented Interfaces:
Builder<RemoteCacheConfiguration>
public class RemoteCacheConfigurationBuilder
extends Object
implements Builder<RemoteCacheConfiguration>
Per-cache configuration.
- Since:
- 11.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
Method Summary
Modifier and TypeMethodDescriptionconfiguration(String configuration) Specifies the declarative configuration to be used to create the cache if it doesn't already exist on the server.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.create()Create the configuration beanforceReturnValues(boolean forceReturnValues) Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache.marshaller(Class<? extends Marshaller> marshallerClass) Specifies a customMarshallerimplementation.marshaller(String className) Specifies a customMarshallerimplementation.marshaller(Marshaller marshaller) Specifies a customMarshallerimplementation to serialize and deserialize user objects.nearCacheFactory(NearCacheFactory factory) Specifies aNearCacheFactorywhich is responsible for creatingNearCacheinstances.nearCacheMaxEntries(int maxEntries) Specifies the maximum number of entries that will be held in the near cache.nearCacheMode(NearCacheMode mode) Specifies the near caching mode.nearCacheUseBloomFilter(boolean enable) Specifies whether bloom filter should be used for near cache to limit the number of write notifications for unrelated keys.Builder<?>read(RemoteCacheConfiguration template, Combine combine) Reads the configuration from an already created configuration bean into this builder.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.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.transactionManager(javax.transaction.TransactionManager manager) Deprecated, for removal: This API element is subject to removal in a future version.since 12.0.TheTransactionManagerLookupto lookup for theTransactionManagerto interact with.TheTransactionModein which aRemoteCachewill be enlisted.voidvalidate()Validate the data in this builder before building the configuration beanwithProperties(Properties properties)
-
Method Details
-
attributes
- Specified by:
attributesin interfaceBuilder<RemoteCacheConfiguration>
-
forceReturnValues
Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache. -
nearCacheMode
Specifies the near caching mode. SeeNearCacheModefor details on the available modes.- Parameters:
mode- one ofNearCacheMode- Returns:
- an instance of the builder
-
nearCacheMaxEntries
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
-
nearCacheUseBloomFilter
Specifies whether bloom filter should be used for near cache to limit the number of write notifications for unrelated keys.- Parameters:
enable- whether to enable bloom filter- Returns:
- an instance of this builder
-
nearCacheFactory
Specifies aNearCacheFactorywhich is responsible for creatingNearCacheinstances.- Parameters:
factory- aNearCacheFactory- Returns:
- an instance of the builder
-
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
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
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
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
TheTransactionModein which aRemoteCachewill be enlisted.- Parameters:
mode- the transaction mode- Returns:
- an instance of the builder
-
marshaller
Specifies a customMarshallerimplementation. Seemarshaller(Marshaller).- Parameters:
className- Fully qualifies class name of the marshaller implementation.
-
marshaller
Specifies a customMarshallerimplementation. Seemarshaller(Marshaller).- Parameters:
marshallerClass- the marshaller class.
-
marshaller
Specifies a customMarshallerimplementation to serialize and deserialize user objects. Has precedence overmarshaller(Class)andmarshaller(String). If not configured, the marshaller from theRemoteCacheManagerwill be used for the cache operations.- Parameters:
marshaller- the marshaller instance
-
transactionManager
@Deprecated(forRemoval=true) public RemoteCacheConfigurationBuilder transactionManager(javax.transaction.TransactionManager manager) Deprecated, for removal: This API element is subject to removal in a future version.since 12.0. To be removed in Infinispan 14. UsetransactionManagerLookup(TransactionManagerLookup)instead.TheTransactionManagerto use for the cache- Parameters:
manager- an instance of a TransactionManager- Returns:
- an instance of the builder
-
transactionManagerLookup
TheTransactionManagerLookupto lookup for theTransactionManagerto interact with.- Parameters:
lookup- ATransactionManagerLookupinstance.- Returns:
- An instance of the builder.
-
validate
public void validate()Description copied from interface:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<RemoteCacheConfiguration>
-
create
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<RemoteCacheConfiguration>- Returns:
-
read
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<RemoteCacheConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.combine- the way attributes and children of this instance and the template should be combined.
-
withProperties
-