Search in sources :

Example 1 with DeployClassesOperation

use of com.hazelcast.internal.usercodedeployment.impl.operation.DeployClassesOperation 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();
        }
    };
    constructors[DEPLOY_CLASSES_OP] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {

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

Aggregations

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