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 <[email protected]>
-
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.commons.configuration.attributes.AttributeSet
configuration
(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()
forceReturnValues
(boolean forceReturnValues) Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache.marshaller
(Class<? extends org.infinispan.commons.marshall.Marshaller> marshallerClass) Specifies a customMarshaller
implementation.marshaller
(String className) Specifies a customMarshaller
implementation.marshaller
(org.infinispan.commons.marshall.Marshaller marshaller) Specifies a customMarshaller
implementation to serialize and deserialize user objects.nearCacheFactory
(NearCacheFactory factory) Specifies aNearCacheFactory
which is responsible for creatingNearCache
instances.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.org.infinispan.commons.configuration.Builder<?>
read
(RemoteCacheConfiguration template) 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.since 12.0.transactionManagerLookup
(org.infinispan.commons.tx.lookup.TransactionManagerLookup lookup) TheTransactionManagerLookup
to lookup for theTransactionManager
to interact with.TheTransactionMode
in which aRemoteCache
will be enlisted.void
validate()
withProperties
(Properties properties)
-
Method Details
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()- Specified by:
attributes
in interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
forceReturnValues
Whether or not to implicitly FORCE_RETURN_VALUE for all calls to this cache. -
nearCacheMode
Specifies the near caching mode. SeeNearCacheMode
for 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 aNearCacheFactory
which is responsible for creatingNearCache
instances.- 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
TheTransactionMode
in which aRemoteCache
will be enlisted.- Parameters:
mode
- the transaction mode- Returns:
- an instance of the builder
-
marshaller
Specifies a customMarshaller
implementation. Seemarshaller(Marshaller)
.- Parameters:
className
- Fully qualifies class name of the marshaller implementation.
-
marshaller
public RemoteCacheConfigurationBuilder marshaller(Class<? extends org.infinispan.commons.marshall.Marshaller> marshallerClass) Specifies a customMarshaller
implementation. Seemarshaller(Marshaller)
.- Parameters:
marshallerClass
- the marshaller class.
-
marshaller
public RemoteCacheConfigurationBuilder marshaller(org.infinispan.commons.marshall.Marshaller marshaller) Specifies a customMarshaller
implementation to serialize and deserialize user objects. Has precedence overmarshaller(Class)
andmarshaller(String)
. If not configured, the marshaller from theRemoteCacheManager
will be used for the cache operations.- Parameters:
marshaller
- the marshaller instance
-
transactionManager
@Deprecated public RemoteCacheConfigurationBuilder transactionManager(javax.transaction.TransactionManager manager) Deprecated.since 12.0. To be removed in Infinispan 14. UsetransactionManagerLookup(TransactionManagerLookup)
instead.TheTransactionManager
to use for the cache- Parameters:
manager
- an instance of a TransactionManager- Returns:
- an instance of the builder
-
transactionManagerLookup
public RemoteCacheConfigurationBuilder transactionManagerLookup(org.infinispan.commons.tx.lookup.TransactionManagerLookup lookup) TheTransactionManagerLookup
to lookup for theTransactionManager
to interact with.- Parameters:
lookup
- ATransactionManagerLookup
instance.- Returns:
- An instance of the builder.
-
validate
public void validate()- Specified by:
validate
in interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
create
- Specified by:
create
in interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
read
- Specified by:
read
in interfaceorg.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
-
withProperties
-