return DFLT_MAPPER; BinaryIdMapper globalIdMapper = cfg.getIdMapper(); BinaryNameMapper globalNameMapper = cfg.getNameMapper();
/** * Create data transfer object for binary configuration. * * @param src Binary configuration. */ public VisorBinaryConfiguration(BinaryConfiguration src) { idMapper = compactClass(src.getIdMapper()); nameMapper = compactClass(src.getNameMapper()); serializer = compactClass(src.getSerializer()); compactFooter = src.isCompactFooter(); typeCfgs = VisorBinaryTypeConfiguration.list(src.getTypeConfigurations()); }
+ " and binary ID mapper is set to " + bCfg.getIdMapper() + " (other nodes must have the same binary name and ID mapper types).")); BinaryIdMapper idMapper = bCfg.getIdMapper(); bCfg.getIdMapper() + " (other nodes must have the same binary ID mapper type)."));
Map<String, Object> map = new HashMap<>(); map.put("globIdMapper", bCfg.getIdMapper() != null ? bCfg.getIdMapper().getClass().getName() : null); map.put("globSerializer", bCfg.getSerializer() != null ? bCfg.getSerializer().getClass() : null); map.put("compactFooter", bCfg.isCompactFooter());
/** * @param marsh Binary marshaller. * @param cfg Configuration. * @throws BinaryObjectException In case of error. */ public void configure(BinaryMarshaller marsh, IgniteConfiguration cfg) throws BinaryObjectException { if (marsh == null) return; this.marsh = marsh; marshCtx = marsh.getContext(); BinaryConfiguration binaryCfg = cfg.getBinaryConfiguration(); if (binaryCfg == null) binaryCfg = new BinaryConfiguration(); assert marshCtx != null; optmMarsh.setContext(marshCtx); configure( binaryCfg.getNameMapper(), binaryCfg.getIdMapper(), binaryCfg.getSerializer(), binaryCfg.getTypeConfigurations() ); compactFooter = binaryCfg.isCompactFooter(); }
/** * @return Expected hash code. * @param fullName Full name of type. */ private int expectedHashCode(String fullName) { BinaryIdMapper idMapper = cfg.getBinaryConfiguration().getIdMapper(); BinaryNameMapper nameMapper = cfg.getBinaryConfiguration().getNameMapper(); if (idMapper == null) idMapper = BinaryContext.defaultIdMapper(); if (nameMapper == null) nameMapper = BinaryContext.defaultNameMapper(); return idMapper.typeId(nameMapper.typeName(fullName)); }
return DFLT_MAPPER; BinaryIdMapper globalIdMapper = cfg.getIdMapper(); BinaryNameMapper globalNameMapper = cfg.getNameMapper();
/** * Create data transfer object for binary configuration. * * @param src Binary configuration. */ public VisorBinaryConfiguration(BinaryConfiguration src) { idMapper = compactClass(src.getIdMapper()); nameMapper = compactClass(src.getNameMapper()); serializer = compactClass(src.getSerializer()); compactFooter = src.isCompactFooter(); typeCfgs = VisorBinaryTypeConfiguration.list(src.getTypeConfigurations()); }
+ " and binary ID mapper is set to " + bCfg.getIdMapper() + " (other nodes must have the same binary name and ID mapper types).")); BinaryIdMapper idMapper = bCfg.getIdMapper(); bCfg.getIdMapper() + " (other nodes must have the same binary ID mapper type)."));
Map<String, Object> map = new HashMap<>(); map.put("globIdMapper", bCfg.getIdMapper() != null ? bCfg.getIdMapper().getClass().getName() : null); map.put("globSerializer", bCfg.getSerializer() != null ? bCfg.getSerializer().getClass() : null); map.put("compactFooter", bCfg.isCompactFooter());
/** * @param marsh Binary marshaller. * @param cfg Configuration. * @throws BinaryObjectException In case of error. */ public void configure(BinaryMarshaller marsh, IgniteConfiguration cfg) throws BinaryObjectException { if (marsh == null) return; this.marsh = marsh; marshCtx = marsh.getContext(); BinaryConfiguration binaryCfg = cfg.getBinaryConfiguration(); if (binaryCfg == null) binaryCfg = new BinaryConfiguration(); assert marshCtx != null; optmMarsh.setContext(marshCtx); configure( binaryCfg.getNameMapper(), binaryCfg.getIdMapper(), binaryCfg.getSerializer(), binaryCfg.getTypeConfigurations() ); compactFooter = binaryCfg.isCompactFooter(); }