Class UserCodeDeploymentConfig
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated, for removal: This API element is subject to removal in a future version.Controls caching of classes loaded from remote membersstatic enum
Deprecated, for removal: This API element is subject to removal in a future version.Controls how to react to receiving a classloading request from a remote member -
Constructor Summary
ConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Return currently configured blacklist prefixes.Deprecated, for removal: This API element is subject to removal in a future version.Return the current ClassCacheModeDeprecated, for removal: This API element is subject to removal in a future version.Get current filter ornull
when no filter is defined.Deprecated, for removal: This API element is subject to removal in a future version.Return the current ProviderModeDeprecated, for removal: This API element is subject to removal in a future version.Return currently configured whitelist prefixesint
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if User Code Deployment is enabledsetBlacklistedPrefixes
(String blacklistedPrefixes) Deprecated, for removal: This API element is subject to removal in a future version.Comma-separated list of class prefixes which will never be loaded remotely.setClassCacheMode
(UserCodeDeploymentConfig.ClassCacheMode classCacheMode) Deprecated, for removal: This API element is subject to removal in a future version.Configure caching of classes loaded from remote members.setEnabled
(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Enable or disable User Code Deployment.setProviderFilter
(String providerFilter) Deprecated, for removal: This API element is subject to removal in a future version.Filter to limit members that can be used for classloading request when a user class is not available locally.setProviderMode
(UserCodeDeploymentConfig.ProviderMode providerMode) Deprecated, for removal: This API element is subject to removal in a future version.Configure behaviour when providing classes to remote members.setWhitelistedPrefixes
(String whitelistedPrefixes) Deprecated, for removal: This API element is subject to removal in a future version.Comma-separated list of class prefixes which will be loaded remotely.
-
Constructor Details
-
UserCodeDeploymentConfig
public UserCodeDeploymentConfig()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setEnabled
Deprecated, for removal: This API element is subject to removal in a future version.Enable or disable User Code Deployment. Default:false
-
isEnabled
public boolean isEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Returns true if User Code Deployment is enabled- Returns:
true
when User Code Deployment is enabled
-
setProviderFilter
Deprecated, for removal: This API element is subject to removal in a future version.Filter to limit members that can be used for classloading request when a user class is not available locally.Filter format:
HAS_ATTRIBUTE:foo
this will send classloading requests only to members which have a member attributefoo
set. Attribute value is ignored, it can be of any type, a presence of the attribute is sufficient.This facility allows to have a fine grained control over classloading. You can e.g. start Hazelcast lite members dedicated for class-serving.
Example usage: This member will load classes only from members with the
class-provider
attribute set. It won't ask any other member to provide a locally unavailable class:Config hazelcastConfig = new Config(); UserCodeDeploymentConfig userCodeDeploymentConfig = hazelcastConfig.getUserCodeDeploymentConfig(); userCodeDeploymentConfig.setProviderFilter("HAS_ATTRIBUTE:class-provider"); HazelcastInstance instance = Hazelcast.newHazelcastInstance(hazelcastConfig);
In the following example, the started member will be marked with the
class-provider
attribute - the member configured above may use it to provide a class which is not locally available:Config hazelcastConfig = new Config(); MemberAttributeConfig memberAttributes = hazelcastConfig.getMemberAttributeConfig(); memberAttributes.setAttribute("class-provider", "true"); HazelcastInstance instance = Hazelcast.newHazelcastInstance(hazelcastConfig);
Setting the filter to null allows using any member to load classes.
Default:
null
- Returns:
- this instance of UserCodeDeploymentConfig for easy method-chaining
- See Also:
-
getProviderFilter
Deprecated, for removal: This API element is subject to removal in a future version.Get current filter ornull
when no filter is defined.- Returns:
- current filter or
null
when no filter is defined - See Also:
-
setBlacklistedPrefixes
Deprecated, for removal: This API element is subject to removal in a future version.Comma-separated list of class prefixes which will never be loaded remotely. A prefix can be a package name or a class name.For example, setting a blacklist prefix to
com.foo
will disable remote loading of all classes from thecom.foo
package and its sub-packages. Eg.com.foo.bar.MyClass
will be black-listed too.The prefix is compared to the class name string. For example, when you set the blacklist to
com.foo.Class
, the classcom.foo.ClassSuffix
will be blacklisted too.Setting the prefixes to
null
or to empty string will disable the blacklist.Default:
null
- Returns:
- this instance of UserCodeDeploymentConfig for easy method-chaining
-
getBlacklistedPrefixes
Deprecated, for removal: This API element is subject to removal in a future version.Return currently configured blacklist prefixes.- Returns:
- currently configured blacklist prefixes
- See Also:
-
setWhitelistedPrefixes
Deprecated, for removal: This API element is subject to removal in a future version.Comma-separated list of class prefixes which will be loaded remotely.Use this to limit User Code Deployment to selected classes only and disable remote loading for all other classes.
The prefixes are interpreted using the same rules as described in
setBlacklistedPrefixes(String)
.Setting the prefixes to
null
or empty string will disable the white-list and all non-blacklisted classes will be allowed to load from remote members.- Returns:
- this instance of UserCodeDeploymentConfig for easy method-chaining
-
getWhitelistedPrefixes
Deprecated, for removal: This API element is subject to removal in a future version.Return currently configured whitelist prefixes- Returns:
- currently configured whitelist prefixes
-
setProviderMode
Deprecated, for removal: This API element is subject to removal in a future version.Configure behaviour when providing classes to remote members.Default:
UserCodeDeploymentConfig.ProviderMode.LOCAL_AND_CACHED_CLASSES
- Returns:
- this instance of UserCodeDeploymentConfig for easy method-chaining
- See Also:
-
getProviderMode
Deprecated, for removal: This API element is subject to removal in a future version.Return the current ProviderMode- Returns:
- current ProviderMode
-
setClassCacheMode
public UserCodeDeploymentConfig setClassCacheMode(UserCodeDeploymentConfig.ClassCacheMode classCacheMode) Deprecated, for removal: This API element is subject to removal in a future version.Configure caching of classes loaded from remote members.- Returns:
- this instance of UserCodeDeploymentConfig for easy method-chaining
- See Also:
-
getClassCacheMode
Deprecated, for removal: This API element is subject to removal in a future version.Return the current ClassCacheMode- Returns:
- current ProviderMode
-
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.
-