com.esotericsoftware.kryo.Kryo.setAsmEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中com.esotericsoftware.kryo.Kryo.setAsmEnabled()方法的一些代码示例,展示了Kryo.setAsmEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Kryo.setAsmEnabled()方法的具体详情如下:
包路径:com.esotericsoftware.kryo.Kryo
类名称:Kryo
方法名:setAsmEnabled

Kryo.setAsmEnabled介绍

[英]Tells Kryo, if ASM-based backend should be used by new serializer instances created using this Kryo instance. Already existing serializer instances are not affected by this setting.

By default, Kryo uses ASM-based backend.
[中]告诉Kryo,使用此Kryo实例创建的新序列化程序实例是否应该使用基于ASM的后端。已存在的序列化程序实例不受此设置的影响。
默认情况下,Kryo使用基于ASM的后端。

代码示例

代码示例来源:origin: apache/flink

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    KryoUtils.applyRegistrations(this.kryo, kryoRegistrations.values());
  }
}

代码示例来源:origin: apache/flink

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: apache/flink

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: apache/flink

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(typeClass);
  }
}
// --------------------------------------------------------------------------------------------

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    this.kryo.setAsmEnabled(true);
    this.kryo.register(this.type);
  }
}

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
    if (this.kryo == null) {
      this.kryo = new Kryo();
      this.kryo.setAsmEnabled(true);
      this.kryo.register(type);
    }
  }
}

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
    if (this.kryo == null) {
      this.kryo = new Kryo();
      this.kryo.setAsmEnabled(true);
      this.kryo.register(type);
    }
  }
}

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
    if (this.kryo == null) {
      this.kryo = new Kryo();
      this.kryo.setAsmEnabled(true);
      this.kryo.register(typeClass);
    }
  }
}

代码示例来源:origin: stratosphere/stratosphere

private final void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: Nepxion/Thunder

public static Kryo createKryo(int maxDepth) {
  Kryo kryo = new Kryo();
  kryo.setRegistrationRequired(false);
  kryo.setAsmEnabled(true);
  kryo.setMaxDepth(maxDepth);
  kryo.setAutoReset(true);
  return kryo;
}

代码示例来源:origin: com.alibaba.blink/flink-core

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    KryoUtils.applyRegistrations(this.kryo, kryoRegistrations.values());
  }
}

代码示例来源:origin: org.apache.flink/flink-core

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    KryoUtils.applyRegistrations(this.kryo, kryoRegistrations.values());
  }
}

代码示例来源:origin: com.alibaba.blink/flink-avro

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    kryo.setAsmEnabled(true);
    KryoUtils.applyRegistrations(kryo, kryoRegistrations.values());
  }
}

代码示例来源:origin: com.alibaba.blink/flink-core

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility_2.11

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: com.alibaba.blink/flink-hadoop-compatibility

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(typeClass);
  }
}
// --------------------------------------------------------------------------------------------

代码示例来源:origin: org.apache.flink/flink-core

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(typeClass);
  }
}
// --------------------------------------------------------------------------------------------

代码示例来源:origin: org.apache.flink/flink-hadoop-compatibility

private void checkKryoInitialized() {
  if (this.kryo == null) {
    this.kryo = new Kryo();
    Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
    instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
    kryo.setInstantiatorStrategy(instantiatorStrategy);
    this.kryo.setAsmEnabled(true);
    this.kryo.register(type);
  }
}

相关文章