use of usercodedeployment.EntryProcessorWithAnonymousAndInner in project hazelcast by hazelcast.
the class ClientUserCodeDeploymentTest method testWithMultipleMembers_anonymousAndInnerClasses.
@Test
public void testWithMultipleMembers_anonymousAndInnerClasses() {
ClientConfig clientConfig = new ClientConfig();
ClientUserCodeDeploymentConfig clientUserCodeDeploymentConfig = new ClientUserCodeDeploymentConfig();
clientUserCodeDeploymentConfig.addJar("EntryProcessorWithAnonymousAndInner.jar");
clientConfig.setUserCodeDeploymentConfig(clientUserCodeDeploymentConfig.setEnabled(true));
Config config = createNodeConfig();
factory.newHazelcastInstance(config);
HazelcastInstance client = factory.newHazelcastClient(clientConfig);
factory.newHazelcastInstance(config);
assertCodeDeploymentWorking(client, new EntryProcessorWithAnonymousAndInner());
}
use of usercodedeployment.EntryProcessorWithAnonymousAndInner in project hazelcast by hazelcast.
the class UserCodeDeploymentBasicTest method givenSomeMemberCanAccessTheEP_whenTheEPIsFilteredLocally_thenItWillBeLoadedOverNetwork_anonymousInnerClasses.
@Test
public void givenSomeMemberCanAccessTheEP_whenTheEPIsFilteredLocally_thenItWillBeLoadedOverNetwork_anonymousInnerClasses() {
Config i1Config = new Config();
i1Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
Config i2Config = new Config();
FilteringClassLoader filteringCL = new FilteringClassLoader(singletonList("usercodedeployment"), null);
i2Config.setClassLoader(filteringCL);
i2Config.getUserCodeDeploymentConfig().setEnabled(true).setClassCacheMode(classCacheMode);
EntryProcessorWithAnonymousAndInner incrementingEntryProcessor = new EntryProcessorWithAnonymousAndInner();
executeSimpleTestScenario(i1Config, i2Config, incrementingEntryProcessor);
}
Aggregations