本文整理汇总了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);
}
示例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);
}
};
}
示例3: createFactory
import com.hazelcast.nio.serialization.DataSerializableFactory; //导入依赖的package包/类
@Override
public DataSerializableFactory createFactory() {
return new Factory();
}