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


Java IdentifiedDataSerializable类代码示例

本文整理汇总了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);
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:22,代码来源:SystemSerializationFactory.java

示例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;
}
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:27,代码来源:WebDataSerializerHook.java

示例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;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:24,代码来源:TaskSerializationFactory.java

示例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;
}
 
开发者ID:dsukhoroslov,项目名称:bagri,代码行数:19,代码来源:SystemSerializationFactory.java

示例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);
}
 
开发者ID:noctarius,项目名称:snowcast,代码行数:18,代码来源:SequencerDataSerializerHook.java

示例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;
    }
}
 
开发者ID:buremba,项目名称:hazelcast-modules,代码行数:24,代码来源:HyperLogLogSerializerFactory.java

示例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;
    }
}
 
开发者ID:ivogm,项目名称:bookstore,代码行数:12,代码来源:ShoppingCartDSFactory.java

示例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;
    }
}
 
开发者ID:networknt,项目名称:light-oauth2,代码行数:9,代码来源:ClientDataSerializableFactory.java

示例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;
    }
}
 
开发者ID:networknt,项目名称:light-oauth2,代码行数:9,代码来源:ServiceDataSerializableFactory.java

示例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;
    }
}
 
开发者ID:networknt,项目名称:light-oauth2,代码行数:9,代码来源:UserDataSerializableFactory.java

示例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;
    }
}
 
开发者ID:networknt,项目名称:light-oauth2,代码行数:9,代码来源:RefreshTokenDataSerializableFactory.java

示例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 + "]");
	}
}
 
开发者ID:anyflow,项目名称:lannister,代码行数:38,代码来源:SerializableFactory.java

示例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;
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:31,代码来源:HibernateDataSerializerHook.java

示例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);
        }
    };
}
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:10,代码来源:WebDataSerializerHook.java

示例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;
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:31,代码来源:HibernateDataSerializerHook.java


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