Class SerializationConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.global.SerializationConfigurationBuilder
-
- All Implemented Interfaces:
Builder<SerializationConfiguration>
,GlobalConfigurationChildBuilder
public class SerializationConfigurationBuilder extends Object implements Builder<SerializationConfiguration>
Configures serialization and marshalling settings.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> SerializationConfigurationBuilder
addAdvancedExternalizer(int id, AdvancedExternalizer<T> advancedExternalizer)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release.<T> SerializationConfigurationBuilder
addAdvancedExternalizer(AdvancedExternalizer<T> advancedExternalizer)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release.<T> SerializationConfigurationBuilder
addAdvancedExternalizer(AdvancedExternalizer<T>... advancedExternalizers)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release.SerializationConfigurationBuilder
addContextInitializer(org.infinispan.protostream.SerializationContextInitializer sci)
SerializationConfigurationBuilder
addContextInitializers(List<org.infinispan.protostream.SerializationContextInitializer> scis)
SerializationConfigurationBuilder
addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... scis)
ThreadPoolConfigurationBuilder
asyncThreadPool()
Configuration for the asynchronous operations thread poolGlobalConfiguration
build()
Builds aGlobalConfiguration
object using the settings applied to this builderSerializationConfigurationBuilder
classResolver(Object classResolver)
Deprecated.since 10.0ClassResolver
is specific to jboss-marshalling and will be removed in a future version.SerializationConfiguration
create()
Create the configuration beanGlobalConfigurationBuilder
defaultCacheName(String defaultCacheName)
Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
.ThreadPoolConfigurationBuilder
expirationThreadPool()
Configuration for the expiration thread poolprotected GlobalConfigurationBuilder
getGlobalConfig()
Marshaller
getMarshaller()
GlobalStateConfigurationBuilder
globalState()
Global state configurationGlobalJmxConfigurationBuilder
jmx()
Global JMX configuration.ThreadPoolConfigurationBuilder
listenerThreadPool()
Configuration for the listener thread poolSerializationConfigurationBuilder
marshaller(Marshaller marshaller)
Set the marshaller instance that will marshall and unmarshall cache entries.GlobalMetricsConfigurationBuilder
metrics()
Global microprofile metrics configuration.List<Builder<?>>
modules()
Global modules configurationThreadPoolConfigurationBuilder
persistenceThreadPool()
Configuration for the persistence thread poolSerializationConfigurationBuilder
read(SerializationConfiguration template)
Reads the configuration from an already created configuration bean into this builder.GlobalSecurityConfigurationBuilder
security()
Security-related configurationSerializationConfigurationBuilder
serialization()
Global serialization (i.e.ShutdownConfigurationBuilder
shutdown()
Shutdown configurationSiteConfigurationBuilder
site()
Cross-site replication configurationThreadPoolConfigurationBuilder
stateTransferThreadPool()
Configuration for the state-transfer thread poolString
toString()
TransportConfigurationBuilder
transport()
Transport-related (i.e.void
validate()
Validate the data in this builder before building the configuration beanSerializationConfigurationBuilder
version(short marshallVersion)
Deprecated.since 10.1 configured value is never used.SerializationConfigurationBuilder
version(String marshallVersion)
Deprecated.since 10.1 configured value is never used.WhiteListConfigurationBuilder
whiteList()
-
Methods inherited from interface org.infinispan.configuration.global.GlobalConfigurationChildBuilder
globalJmxStatistics
-
-
-
-
Method Detail
-
marshaller
public SerializationConfigurationBuilder marshaller(Marshaller marshaller)
Set the marshaller instance that will marshall and unmarshall cache entries.- Parameters:
marshaller
-
-
getMarshaller
public Marshaller getMarshaller()
-
version
@Deprecated public SerializationConfigurationBuilder version(short marshallVersion)
Deprecated.since 10.1 configured value is never used.Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller.- Parameters:
marshallVersion
-
-
version
@Deprecated public SerializationConfigurationBuilder version(String marshallVersion)
Deprecated.since 10.1 configured value is never used.Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller.- Parameters:
marshallVersion
-
-
addAdvancedExternalizer
@Deprecated public <T> SerializationConfigurationBuilder addAdvancedExternalizer(int id, AdvancedExternalizer<T> advancedExternalizer)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release. Please utilise ProtoStream annotations on Java objects instead by configuring aSerializationContextInitializer
viaaddContextInitializer(SerializationContextInitializer)
, or specifying a custom marshaller for user types viamarshaller(Marshaller)
.Helper method that allows for quick registration of anAdvancedExternalizer
implementation alongside its corresponding identifier. Remember that the identifier needs to a be positive number, including 0, and cannot clash with other identifiers in the system.- Parameters:
id
-advancedExternalizer
-
-
addAdvancedExternalizer
@Deprecated public <T> SerializationConfigurationBuilder addAdvancedExternalizer(AdvancedExternalizer<T> advancedExternalizer)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release. Please utilise ProtoStream annotations on Java objects instead by configuring aSerializationContextInitializer
viaaddContextInitializer(SerializationContextInitializer)
, or specifying a custom marshaller for user types viamarshaller(Marshaller)
.Helper method that allows for quick registration of anAdvancedExternalizer
implementation alongside its corresponding identifier. Remember that the identifier needs to a be positive number, including 0, and cannot clash with other identifiers in the system.- Parameters:
advancedExternalizer
-
-
addAdvancedExternalizer
@Deprecated public <T> SerializationConfigurationBuilder addAdvancedExternalizer(AdvancedExternalizer<T>... advancedExternalizers)
Deprecated.since 10.0,AdvancedExternalizer
's will be removed in a future release. Please utilise ProtoStream annotations on Java objects instead by configuring aSerializationContextInitializer
viaaddContextInitializer(SerializationContextInitializer)
, or specifying a custom marshaller for user types viamarshaller(Marshaller)
.Helper method that allows for quick registration ofAdvancedExternalizer
implementations.- Parameters:
advancedExternalizers
-
-
classResolver
@Deprecated public SerializationConfigurationBuilder classResolver(Object classResolver)
Deprecated.since 10.0ClassResolver
is specific to jboss-marshalling and will be removed in a future version.Class resolver to use when unmarshalling objects.- Parameters:
classResolver
-
-
addContextInitializer
public SerializationConfigurationBuilder addContextInitializer(org.infinispan.protostream.SerializationContextInitializer sci)
-
addContextInitializers
public SerializationConfigurationBuilder addContextInitializers(org.infinispan.protostream.SerializationContextInitializer... scis)
-
addContextInitializers
public SerializationConfigurationBuilder addContextInitializers(List<org.infinispan.protostream.SerializationContextInitializer> scis)
-
whiteList
public WhiteListConfigurationBuilder whiteList()
-
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<SerializationConfiguration>
-
create
public SerializationConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<SerializationConfiguration>
- Returns:
-
read
public SerializationConfigurationBuilder read(SerializationConfiguration 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<SerializationConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
toString
public String toString()
-
getGlobalConfig
protected GlobalConfigurationBuilder getGlobalConfig()
-
transport
public TransportConfigurationBuilder transport()
Description copied from interface:GlobalConfigurationChildBuilder
Transport-related (i.e. clustering) configuration- Specified by:
transport
in interfaceGlobalConfigurationChildBuilder
-
metrics
public GlobalMetricsConfigurationBuilder metrics()
Description copied from interface:GlobalConfigurationChildBuilder
Global microprofile metrics configuration.- Specified by:
metrics
in interfaceGlobalConfigurationChildBuilder
-
jmx
public GlobalJmxConfigurationBuilder jmx()
Description copied from interface:GlobalConfigurationChildBuilder
Global JMX configuration.- Specified by:
jmx
in interfaceGlobalConfigurationChildBuilder
-
globalState
public GlobalStateConfigurationBuilder globalState()
Description copied from interface:GlobalConfigurationChildBuilder
Global state configuration- Specified by:
globalState
in interfaceGlobalConfigurationChildBuilder
-
serialization
public SerializationConfigurationBuilder serialization()
Description copied from interface:GlobalConfigurationChildBuilder
Global serialization (i.e. marshalling) configuration- Specified by:
serialization
in interfaceGlobalConfigurationChildBuilder
-
listenerThreadPool
public ThreadPoolConfigurationBuilder listenerThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the listener thread pool- Specified by:
listenerThreadPool
in interfaceGlobalConfigurationChildBuilder
-
asyncThreadPool
public ThreadPoolConfigurationBuilder asyncThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the asynchronous operations thread pool- Specified by:
asyncThreadPool
in interfaceGlobalConfigurationChildBuilder
-
expirationThreadPool
public ThreadPoolConfigurationBuilder expirationThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the expiration thread pool- Specified by:
expirationThreadPool
in interfaceGlobalConfigurationChildBuilder
-
persistenceThreadPool
public ThreadPoolConfigurationBuilder persistenceThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the persistence thread pool- Specified by:
persistenceThreadPool
in interfaceGlobalConfigurationChildBuilder
-
stateTransferThreadPool
public ThreadPoolConfigurationBuilder stateTransferThreadPool()
Description copied from interface:GlobalConfigurationChildBuilder
Configuration for the state-transfer thread pool- Specified by:
stateTransferThreadPool
in interfaceGlobalConfigurationChildBuilder
-
security
public GlobalSecurityConfigurationBuilder security()
Description copied from interface:GlobalConfigurationChildBuilder
Security-related configuration- Specified by:
security
in interfaceGlobalConfigurationChildBuilder
-
shutdown
public ShutdownConfigurationBuilder shutdown()
Description copied from interface:GlobalConfigurationChildBuilder
Shutdown configuration- Specified by:
shutdown
in interfaceGlobalConfigurationChildBuilder
-
site
public SiteConfigurationBuilder site()
Description copied from interface:GlobalConfigurationChildBuilder
Cross-site replication configuration- Specified by:
site
in interfaceGlobalConfigurationChildBuilder
-
modules
public List<Builder<?>> modules()
Description copied from interface:GlobalConfigurationChildBuilder
Global modules configuration- Specified by:
modules
in interfaceGlobalConfigurationChildBuilder
-
defaultCacheName
public GlobalConfigurationBuilder defaultCacheName(String defaultCacheName)
Description copied from interface:GlobalConfigurationChildBuilder
Sets the name of the cache that acts as the default cache and is returned byEmbeddedCacheManager.getCache()
. Not- Specified by:
defaultCacheName
in interfaceGlobalConfigurationChildBuilder
-
build
public GlobalConfiguration build()
Description copied from interface:GlobalConfigurationChildBuilder
Builds aGlobalConfiguration
object using the settings applied to this builder- Specified by:
build
in interfaceGlobalConfigurationChildBuilder
-
-