Ejemplo n.º 1
0
  /**
   * @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.getIdMapper(), binaryCfg.getSerializer(), binaryCfg.getTypeConfigurations());

    compactFooter = binaryCfg.isCompactFooter();
  }