本文整理汇总了Java中com.hazelcast.nio.serialization.IdentifiedDataSerializable类的典型用法代码示例。如果您正苦于以下问题:Java IdentifiedDataSerializable类的具体用法?Java IdentifiedDataSerializable怎么用?Java IdentifiedDataSerializable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IdentifiedDataSerializable类属于com.hazelcast.nio.serialization包,在下文中一共展示了IdentifiedDataSerializable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
switch (typeId) {
case cli_CompressingCursor: return new CompressingCursorImpl<>();
case cli_DocumentAccessor: return new DocumentAccessorImpl(repo);
case cli_CompressingDocumentAccessor: return new CompressingDocumentAccessorImpl();
case cli_GroupCountPredicate: return new GroupCountPredicate();
case cli_QueryPredicate: return new QueryPredicate();
case cli_DocsAwarePredicate: return new DocsAwarePredicate();
case cli_ResultsDocPredicate: return new ResultsDocPredicate();
case cli_ResultsQueryPredicate: return new ResultsQueryPredicate();
case cli_CollectionPredicate: return new CollectionPredicate();
case cli_DocVisiblePredicate: return new DocVisiblePredicate();
case cli_LimitPredicate: return new LimitPredicate<>();
case cli_LimitAggregator: return new LimitAggregator<>();
case cli_DocumentProcessor: return new DocumentProcessor();
case cli_DocumentBackupProcessor: return new DocumentBackupProcessor();
}
return super.create(typeId);
}
示例2: getIdentifiedDataSerializable
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
private IdentifiedDataSerializable getIdentifiedDataSerializable(int typeId) {
IdentifiedDataSerializable dataSerializable;
switch (typeId) {
case SESSION_UPDATE:
dataSerializable = new SessionUpdateEntryProcessor();
break;
case SESSION_DELETE:
dataSerializable = new DeleteSessionEntryProcessor();
break;
case GET_ATTRIBUTE:
dataSerializable = new GetAttributeEntryProcessor();
break;
case GET_ATTRIBUTE_NAMES:
dataSerializable = new GetAttributeNamesEntryProcessor();
break;
case GET_SESSION_STATE:
dataSerializable = new GetSessionStateEntryProcessor();
break;
case SESSION_STATE:
dataSerializable = new SessionState();
break;
default:
dataSerializable = null;
}
return dataSerializable;
}
示例3: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
switch (typeId) {
case cli_GetDocumentTask: return new DocumentProvider();
case cli_GetDocumentsTask: return new DocumentsProvider();
//case cli_GetDocumentUrisTask: return new DocumentUrisProvider();
case cli_StoreDocumentTask: return new DocumentCreator();
case cli_StoreDocumentsTask: return new DocumentsCreator();
case cli_RemoveDocumentTask: return new DocumentRemover();
case cli_RemoveDocumentsTask: return new DocumentsRemover();
case cli_GetCollectionsTask: return new CollectionsProvider();
case cli_UpdateDocumentCollectionTask: return new DocumentCollectionUpdater();
case cli_BeginTransactionTask: return new TransactionStarter();
case cli_CommitTransactionTask: return new TransactionCommiter();
case cli_RollbackTransactionTask: return new TransactionAborter();
case cli_ExecQueryTask: return new QueryExecutor();
case cli_ProcessQueryTask: return new QueryProcessor();
case cli_FetchResultsTask: return new ResultFetcher();
case cli_ProvideQueryUrisTask: return new QueryUrisProvider();
case cli_AuthenticateTask: return new UserAuthenticator();
}
return null;
}
示例4: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
switch (typeId) {
case cli_PartitionStats: return new PartitionStatistics();
case cli_QueuedCursor: return new QueuedCursorImpl<>();
case cli_FixedCursor: return new FixedCursorImpl<>();
case cli_CompressingCursor: return new CompressingCursorImpl<>();
case cli_BoundedCursor: return new BoundedCursorImpl<>();
case cli_DocumentAccessor: return new DocumentAccessorImpl();
case cli_CompressingDocumentAccessor: return new CompressingDocumentAccessorImpl();
case cli_DocumentKey: return new DocumentPartKey();
case cli_DocumentPathKey: return new DocumentPathKey();
case cli_PathIndexKey: return new PathIndexKey();
case cli_QueryParamsKey: return new QueryParamsKey();
//case cli_UrlHashKey: return new UrlHashKey();
}
return null;
}
示例5: createFactory
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的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);
}
示例6: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
switch (typeId) {
case ADD_BACKUP:
return new AddBackupOperation();
case ADD:
return new ResetOperation();
case ADD_ALL_BACKUP:
return new AddAllBackupOperation();
case ADD_ALL:
return new AddAllOperation();
case CARDINALITY:
return new CardinalityOperation();
case UNION_BACKUP:
return new UnionBackupOperation();
case UNION:
return new UnionOperation();
case REPLICATION:
return new HyperLogLogReplicationOperation();
default:
return null;
}
}
示例7: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
switch (typeId) {
case 1:
return new BookCartItem();
case 2:
return new ShoppingCart();
default:
return null;
}
}
示例8: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
if (typeId == CLIENT_TYPE) {
return new Client();
} else {
return null;
}
}
示例9: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
if (typeId == SERVICE_TYPE) {
return new Service();
} else {
return null;
}
}
示例10: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
if (typeId == USER_TYPE) {
return new User();
} else {
return null;
}
}
示例11: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
if (typeId == REFRESH_TOKEN_TYPE) {
return new RefreshToken();
} else {
return null;
}
}
示例12: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int classId) {
switch (classId) {
case Message.ID:
return new Message();
case InboundMessageStatus.ID:
return new InboundMessageStatus();
case OutboundMessageStatus.ID:
return new OutboundMessageStatus();
case Session.ID:
return new Session();
case Notification.ID:
return new Notification();
case Topic.ID:
return new Topic();
case TopicSubscriber.ID:
return new TopicSubscriber();
case TopicSubscription.ID:
return new TopicSubscription();
case SerializableStringSet.ID:
return new SerializableStringSet();
case SerializableIntegerSet.ID:
return new SerializableIntegerSet();
default:
throw new Error("Invalid class ID of Hazelcast Serialization [ID=" + classId + "]");
}
}
示例13: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(final int typeId) {
IdentifiedDataSerializable result;
switch (typeId) {
case VALUE:
result = new Value();
break;
case EXPIRY_MARKER:
result = new ExpiryMarker();
break;
case LOCK:
result = new LockEntryProcessor();
break;
case UNLOCK:
result = new UnlockEntryProcessor();
break;
case UPDATE:
result = new UpdateEntryProcessor();
break;
case INVALIDATION:
result = new Invalidation();
break;
case TIMESTAMP:
result = new Timestamp();
break;
default:
result = null;
}
return result;
}
示例14: createFactory
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public DataSerializableFactory createFactory() {
return new DataSerializableFactory() {
@Override
public IdentifiedDataSerializable create(final int typeId) {
return getIdentifiedDataSerializable(typeId);
}
};
}
示例15: create
import com.hazelcast.nio.serialization.IdentifiedDataSerializable; //导入依赖的package包/类
@Override
public IdentifiedDataSerializable create(int typeId) {
IdentifiedDataSerializable result;
switch (typeId) {
case VALUE:
result = new Value();
break;
case EXPIRY_MARKER:
result = new ExpiryMarker();
break;
case LOCK:
result = new LockEntryProcessor();
break;
case UNLOCK:
result = new UnlockEntryProcessor();
break;
case UPDATE:
result = new UpdateEntryProcessor();
break;
case INVALIDATION:
result = new Invalidation();
break;
case TIMESTAMP:
result = new Timestamp();
break;
default:
result = null;
}
return result;
}