Search in sources :

Example 1 with ClassSource

use of com.hazelcast.internal.usercodedeployment.impl.ClassSource in project hazelcast by hazelcast.

the class UserCodeDeploymentService method init.

@Override
public void init(NodeEngine nodeEngine, Properties properties) {
    UserCodeDeploymentConfig config = nodeEngine.getConfig().getUserCodeDeploymentConfig();
    if (!config.isEnabled()) {
        return;
    }
    ClassLoader parent = nodeEngine.getConfigClassLoader().getParent();
    Filter<String> classNameFilter = parseClassNameFilters(config);
    Filter<Member> memberFilter = parseMemberFilter(config.getProviderFilter());
    ConcurrentMap<String, ClassSource> classMap = new ConcurrentHashMap<String, ClassSource>();
    ConcurrentMap<String, ClassSource> clientClassMap = new ConcurrentHashMap<String, ClassSource>();
    UserCodeDeploymentConfig.ProviderMode providerMode = config.getProviderMode();
    ILogger providerLogger = nodeEngine.getLogger(ClassDataProvider.class);
    provider = new ClassDataProvider(providerMode, parent, classMap, clientClassMap, providerLogger);
    UserCodeDeploymentConfig.ClassCacheMode classCacheMode = config.getClassCacheMode();
    locator = new ClassLocator(classMap, clientClassMap, parent, classNameFilter, memberFilter, classCacheMode, nodeEngine);
    enabled = config.isEnabled();
}
Also used : ClassLocator(com.hazelcast.internal.usercodedeployment.impl.ClassLocator) ClassDataProvider(com.hazelcast.internal.usercodedeployment.impl.ClassDataProvider) ILogger(com.hazelcast.logging.ILogger) UserCodeDeploymentConfig(com.hazelcast.config.UserCodeDeploymentConfig) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Member(com.hazelcast.cluster.Member) ClassSource(com.hazelcast.internal.usercodedeployment.impl.ClassSource)

Aggregations

Member (com.hazelcast.cluster.Member)1 UserCodeDeploymentConfig (com.hazelcast.config.UserCodeDeploymentConfig)1 ClassDataProvider (com.hazelcast.internal.usercodedeployment.impl.ClassDataProvider)1 ClassLocator (com.hazelcast.internal.usercodedeployment.impl.ClassLocator)1 ClassSource (com.hazelcast.internal.usercodedeployment.impl.ClassSource)1 ILogger (com.hazelcast.logging.ILogger)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1