/** * @param factoryId factory ID of portableFactory to be registered * @param portableFactoryClass name of the 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, String portableFactoryClass) { getPortableFactoryClasses().put(factoryId, portableFactoryClass); return this; }
/** * @param factoryId factory ID of portableFactory to be registered * @param portableFactoryClass name of the 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, String portableFactoryClass) { getPortableFactoryClasses().put(factoryId, portableFactoryClass); return this; }
private void buildPortableFactories(Map<Integer, PortableFactory> portableFactories, SerializationConfig config, ClassLoader cl) { Map<Integer, String> portableFactoryClasses = config.getPortableFactoryClasses(); for (Map.Entry<Integer, String> entry : portableFactoryClasses.entrySet()) { int factoryId = entry.getKey(); String factoryClassName = entry.getValue(); if (factoryId <= 0) { throw new IllegalArgumentException("PortableFactory factoryId must be positive! -> " + factoryClassName); } if (portableFactories.containsKey(factoryId)) { throw new IllegalArgumentException("PortableFactory with factoryId '" + factoryId + "' is already registered!"); } PortableFactory factory; try { factory = ClassLoaderUtil.newInstance(cl, factoryClassName); } catch (Exception e) { throw new HazelcastSerializationException(e); } portableFactories.put(factoryId, factory); } } }
private void buildPortableFactories(Map<Integer, PortableFactory> portableFactories, SerializationConfig config, ClassLoader cl) { Map<Integer, String> portableFactoryClasses = config.getPortableFactoryClasses(); for (Map.Entry<Integer, String> entry : portableFactoryClasses.entrySet()) { int factoryId = entry.getKey(); String factoryClassName = entry.getValue(); if (factoryId <= 0) { throw new IllegalArgumentException("PortableFactory factoryId must be positive! -> " + factoryClassName); } if (portableFactories.containsKey(factoryId)) { throw new IllegalArgumentException("PortableFactory with factoryId '" + factoryId + "' is already registered!"); } PortableFactory factory; try { factory = ClassLoaderUtil.newInstance(cl, factoryClassName); } catch (Exception e) { throw new HazelcastSerializationException(e); } portableFactories.put(factoryId, factory); } } }
Map<Integer, String> portableClasses = serialization.getPortableFactoryClasses(); Map<Integer, PortableFactory> portableImpls = serialization.getPortableFactories(); if (!portableClasses.isEmpty() || !portableImpls.isEmpty()) {
Map<Integer, String> portableClasses = serialization.getPortableFactoryClasses(); Map<Integer, PortableFactory> portableImpls = serialization.getPortableFactories(); if (!portableClasses.isEmpty() || !portableImpls.isEmpty()) {
Map<Integer, String> portableClasses = c.getPortableFactoryClasses(); Map<Integer, PortableFactory> portableImpls = c.getPortableFactories(); if (!MapUtil.isNullOrEmpty(portableClasses) || !MapUtil.isNullOrEmpty(portableImpls)) {
Map<Integer, String> portableClasses = c.getPortableFactoryClasses(); Map<Integer, PortableFactory> portableImpls = c.getPortableFactories(); if (!MapUtil.isNullOrEmpty(portableClasses) || !MapUtil.isNullOrEmpty(portableImpls)) {