当前位置: 首页>>代码示例>>Java>>正文


Java DataSerializableFactory类代码示例

本文整理汇总了Java中com.hazelcast.nio.serialization.DataSerializableFactory的典型用法代码示例。如果您正苦于以下问题:Java DataSerializableFactory类的具体用法?Java DataSerializableFactory怎么用?Java DataSerializableFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DataSerializableFactory类属于com.hazelcast.nio.serialization包,在下文中一共展示了DataSerializableFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFactory

import com.hazelcast.nio.serialization.DataSerializableFactory; //导入依赖的package包/类
@Nonnull
@Override
public DataSerializableFactory createFactory() {
    ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN];
    constructors[TYPE_ATTACH_LOGICAL_NODE] = id -> new AttachLogicalNodeOperation();
    constructors[TYPE_DETACH_LOGICAL_NODE] = id -> new DetachLogicalNodeOperation();
    constructors[TYPE_CREATE_SEQUENCER_DEFINITION] = id -> new CreateSequencerDefinitionOperation();
    constructors[TYPE_DESTROY_SEQUENCER_DEFINITION] = id -> new DestroySequencerDefinitionOperation();
    constructors[TYPE_DESTROY_SEQUENCER] = id -> new DestroySequencerOperation();
    constructors[TYPE_REPLICATION_OPERATION] = id -> new SequencerReplicationOperation();
    constructors[TYPE_PARTITION_REPLICATION] = id -> new PartitionReplication();
    constructors[TYPE_BACKUP_CREATE_SEQUENCER_DEFINITION] = id -> new BackupCreateSequencerDefinitionOperation();
    constructors[TYPE_BACKUP_DESTROY_SEQUENCER_DEFINITION] = id -> new BackupDestroySequencerDefinitionOperation();
    constructors[TYPE_BACKUP_ATTACH_LOGICAL_NODE] = id -> new BackupAttachLogicalNodeOperation();
    constructors[TYPE_BACKUP_DETACH_LOGICAL_NODE] = id -> new BackupDetachLogicalNodeOperation();
    return new ArrayDataSerializableFactory(constructors);
}
 
开发者ID:noctarius,项目名称:snowcast,代码行数:18,代码来源:SequencerDataSerializerHook.java

示例2: createFactory

import com.hazelcast.nio.serialization.DataSerializableFactory; //导入依赖的package包/类
@Override
public DataSerializableFactory createFactory() {
    return new DataSerializableFactory() {
        @Override
        public IdentifiedDataSerializable create(final int typeId) {
            return getIdentifiedDataSerializable(typeId);
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:10,代码来源:WebDataSerializerHook.java

示例3: createFactory

import com.hazelcast.nio.serialization.DataSerializableFactory; //导入依赖的package包/类
@Override
public DataSerializableFactory createFactory() {
    return new Factory();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:5,代码来源:HibernateDataSerializerHook.java


注:本文中的com.hazelcast.nio.serialization.DataSerializableFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。