/** * @param factoryId factory ID of portableFactory to be registered * @param portableFactoryClass portableFactory class to be registered * @return configured {@link com.hazelcast.config.SerializerConfig} for chaining * @see com.hazelcast.nio.serialization.PortableFactory */ public SerializationConfig addPortableFactoryClass(int factoryId, Class<? extends PortableFactory> portableFactoryClass) { String portableFactoryClassName = isNotNull(portableFactoryClass, "portableFactoryClass").getName(); return addPortableFactoryClass(factoryId, portableFactoryClassName); }
/** * @param factoryId factory ID of portableFactory to be registered * @param portableFactoryClass portableFactory class to be registered * @return configured {@link com.hazelcast.config.SerializerConfig} for chaining * @see com.hazelcast.nio.serialization.PortableFactory */ public SerializationConfig addPortableFactoryClass(int factoryId, Class<? extends PortableFactory> portableFactoryClass) { String portableFactoryClassName = isNotNull(portableFactoryClass, "portableFactoryClass").getName(); return addPortableFactoryClass(factoryId, portableFactoryClassName); }
protected void fillPortableFactories(Node node, SerializationConfig serializationConfig) { for (Node child : childElements(node)) { final String name = cleanNodeName(child); if ("portable-factory".equals(name)) { final String value = getTextContent(child); final Node factoryIdNode = child.getAttributes().getNamedItem("factory-id"); if (factoryIdNode == null) { throw new IllegalArgumentException("'factory-id' attribute of 'portable-factory' is required!"); } int factoryId = Integer.parseInt(getTextContent(factoryIdNode)); serializationConfig.addPortableFactoryClass(factoryId, value); } } }
protected void fillPortableFactories(Node node, SerializationConfig serializationConfig) { for (Node child : childElements(node)) { final String name = cleanNodeName(child); if ("portable-factory".equals(name)) { final String value = getTextContent(child); final Node factoryIdNode = child.getAttributes().getNamedItem("factory-id"); if (factoryIdNode == null) { throw new IllegalArgumentException("'factory-id' attribute of 'portable-factory' is required!"); } int factoryId = Integer.parseInt(getTextContent(factoryIdNode)); serializationConfig.addPortableFactoryClass(factoryId, value); } } }