本文整理汇总了Java中com.esotericsoftware.kryo.factories.SerializerFactory类的典型用法代码示例。如果您正苦于以下问题:Java SerializerFactory类的具体用法?Java SerializerFactory怎么用?Java SerializerFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SerializerFactory类属于com.esotericsoftware.kryo.factories包,在下文中一共展示了SerializerFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setDefaultSerializer
import com.esotericsoftware.kryo.factories.SerializerFactory; //导入依赖的package包/类
/** Sets the serializer factory to use when no {@link #addDefaultSerializer(Class, Class) default serializers} match an object's
* type. Default is {@link ReflectionSerializerFactory} with {@link FieldSerializer}.
* @see #newDefaultSerializer(Class) */
public void setDefaultSerializer (SerializerFactory serializer) {
if (serializer == null) throw new IllegalArgumentException("serializer cannot be null.");
defaultSerializer = serializer;
}
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:8,代码来源:Kryo.java
示例2: addDefaultSerializer
import com.esotericsoftware.kryo.factories.SerializerFactory; //导入依赖的package包/类
public void addDefaultSerializer (Class type, SerializerFactory serializerFactory) {
if (type == null) throw new IllegalArgumentException("type cannot be null.");
if (serializerFactory == null) throw new IllegalArgumentException("serializerFactory cannot be null.");
DefaultSerializerEntry entry = new DefaultSerializerEntry(type, serializerFactory);
defaultSerializers.add(defaultSerializers.size() - lowPriorityDefaultSerializerCount, entry);
}
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:7,代码来源:Kryo.java
示例3: DefaultSerializerEntry
import com.esotericsoftware.kryo.factories.SerializerFactory; //导入依赖的package包/类
DefaultSerializerEntry (Class type, SerializerFactory serializerFactory) {
this.type = type;
this.serializerFactory = serializerFactory;
}
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:5,代码来源:Kryo.java
注:本文中的com.esotericsoftware.kryo.factories.SerializerFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论