use of com.hazelcast.client.config.ClientUserCodeDeploymentConfig in project hazelcast by hazelcast.
the class ClientUserCodeDeploymentTest method testWithParentAndChildClassesWorksIndependentOfOrder_childFirst.
@Test
public void testWithParentAndChildClassesWorksIndependentOfOrder_childFirst() {
ClientConfig clientConfig = new ClientConfig();
ClientUserCodeDeploymentConfig clientUserCodeDeploymentConfig = new ClientUserCodeDeploymentConfig();
clientUserCodeDeploymentConfig.addClass(SampleSubClass.class);
clientUserCodeDeploymentConfig.addClass(SampleBaseClass.class);
clientConfig.setUserCodeDeploymentConfig(clientUserCodeDeploymentConfig.setEnabled(true));
factory.newHazelcastInstance(createNodeConfig());
factory.newHazelcastClient(clientConfig);
}
use of com.hazelcast.client.config.ClientUserCodeDeploymentConfig in project hazelcast by hazelcast.
the class ClientUserCodeDeploymentConfigTest method testConfigWithClass.
@Test
public void testConfigWithClass() throws ClassNotFoundException, IOException {
ClientUserCodeDeploymentConfig config = new ClientUserCodeDeploymentConfig();
config.setEnabled(true);
config.addClass(IncrementingEntryProcessor.class);
ClientUserCodeDeploymentService service = new ClientUserCodeDeploymentService(config, this.getClass().getClassLoader());
service.start();
List<Map.Entry<String, byte[]>> list = service.getClassDefinitionList();
assertClassLoaded(list, IncrementingEntryProcessor.class.getName());
}
Aggregations