Search in sources :

Example 1 with ClassDataFinderOperation

use of com.hazelcast.internal.usercodedeployment.impl.operation.ClassDataFinderOperation in project hazelcast by hazelcast.

the class ClassLocator method tryToFetchClassDataFromMember.

private ClassData tryToFetchClassDataFromMember(String className, Member member) throws ExecutionException, InterruptedException {
    OperationService operationService = nodeEngine.getOperationService();
    ClassDataFinderOperation op = new ClassDataFinderOperation(className);
    Future<ClassData> classDataFuture = operationService.invokeOnTarget(UserCodeDeploymentService.SERVICE_NAME, op, member.getAddress());
    return classDataFuture.get();
}
Also used : OperationService(com.hazelcast.spi.OperationService) ClassDataFinderOperation(com.hazelcast.internal.usercodedeployment.impl.operation.ClassDataFinderOperation)

Example 2 with ClassDataFinderOperation

use of com.hazelcast.internal.usercodedeployment.impl.operation.ClassDataFinderOperation in project hazelcast by hazelcast.

the class UserCodeDeploymentSerializerHook method createFactory.

@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[CLASS_DATA] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        @Override
        public IdentifiedDataSerializable createNew(Integer arg) {
            return new ClassData();
        }
    };
    constructors[CLASS_DATA_FINDER_OP] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

        @Override
        public IdentifiedDataSerializable createNew(Integer arg) {
            return new ClassDataFinderOperation();
        }
    };
    return new ArrayDataSerializableFactory(constructors);
}
Also used : IdentifiedDataSerializable(com.hazelcast.nio.serialization.IdentifiedDataSerializable) ClassDataFinderOperation(com.hazelcast.internal.usercodedeployment.impl.operation.ClassDataFinderOperation) ArrayDataSerializableFactory(com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory) ConstructorFunction(com.hazelcast.util.ConstructorFunction)

Aggregations

ClassDataFinderOperation (com.hazelcast.internal.usercodedeployment.impl.operation.ClassDataFinderOperation)2 ArrayDataSerializableFactory (com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)1 IdentifiedDataSerializable (com.hazelcast.nio.serialization.IdentifiedDataSerializable)1 OperationService (com.hazelcast.spi.OperationService)1 ConstructorFunction (com.hazelcast.util.ConstructorFunction)1