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 Details

    • attributes

      public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
      Specified by:
      attributes in interface org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
    • 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. See NearCacheMode for details on the available modes.
      Parameters:
      mode - one of NearCacheMode
      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 when nearCacheMode(NearCacheMode) is not NearCacheMode.DISABLED.
      Parameters:
      maxEntries - maximum entries in the near cache.
      Returns:
      an instance of the builder
    • nearCacheUseBloomFilter

      public RemoteCacheConfigurationBuilder nearCacheUseBloomFilter(boolean enable)
      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

      public RemoteCacheConfigurationBuilder nearCacheFactory(NearCacheFactory factory)
      Specifies a NearCacheFactory which is responsible for creating NearCache instances.
      Parameters:
      factory - a NearCacheFactory
      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)
      The TransactionMode in which a RemoteCache will be enlisted.
      Parameters:
      mode - the transaction mode
      Returns:
      an instance of the builder
    • marshaller

      public RemoteCacheConfigurationBuilder marshaller(String className)
      Specifies a custom Marshaller implementation. See marshaller(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 custom Marshaller implementation. See marshaller(Marshaller).
      Parameters:
      marshallerClass - the marshaller class.
    • marshaller

      public RemoteCacheConfigurationBuilder marshaller(org.infinispan.commons.marshall.Marshaller marshaller)
      Specifies a custom Marshaller implementation to serialize and deserialize user objects. Has precedence over marshaller(Class) and marshaller(String). If not configured, the marshaller from the RemoteCacheManager 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. Use transactionManagerLookup(TransactionManagerLookup) instead.
      The TransactionManager 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)
      The TransactionManagerLookup to lookup for the TransactionManager to interact with.
      Parameters:
      lookup - A TransactionManagerLookup instance.
      Returns:
      An instance of the builder.
    • validate

      public void validate()
      Specified by:
      validate in interface org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
    • create

      public RemoteCacheConfiguration create()
      Specified by:
      create in interface org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
    • read

      public org.infinispan.commons.configuration.Builder<?> read(RemoteCacheConfiguration template)
      Specified by:
      read in interface org.infinispan.commons.configuration.Builder<RemoteCacheConfiguration>
    • withProperties

      public ConfigurationBuilder withProperties(Properties properties)