Search in sources :

Example 1 with FilterResultExternalizer

use of org.infinispan.query.remote.impl.filter.FilterResultExternalizer in project infinispan by infinispan.

the class LifecycleManager method cacheManagerStarting.

@Override
public void cacheManagerStarting(GlobalComponentRegistry gcr, GlobalConfiguration globalCfg) {
    Map<Integer, AdvancedExternalizer<?>> externalizerMap = globalCfg.serialization().advancedExternalizers();
    externalizerMap.put(ExternalizerIds.ICKLE_PROTOBUF_CACHE_EVENT_FILTER_CONVERTER, new IckleProtobufCacheEventFilterConverter.Externalizer());
    externalizerMap.put(ExternalizerIds.ICKLE_PROTOBUF_FILTER_AND_CONVERTER, new IckleProtobufFilterAndConverter.Externalizer());
    externalizerMap.put(ExternalizerIds.ICKLE_CONTINUOUS_QUERY_CACHE_EVENT_FILTER_CONVERTER, new IckleContinuousQueryProtobufCacheEventFilterConverter.Externalizer());
    externalizerMap.put(ExternalizerIds.ICKLE_BINARY_PROTOBUF_FILTER_AND_CONVERTER, new IckleBinaryProtobufFilterAndConverter.Externalizer());
    externalizerMap.put(ExternalizerIds.ICKLE_CONTINUOUS_QUERY_RESULT, new ContinuousQueryResultExternalizer());
    externalizerMap.put(ExternalizerIds.ICKLE_FILTER_RESULT, new FilterResultExternalizer());
    BasicComponentRegistry bcr = gcr.getComponent(BasicComponentRegistry.class);
    SerializationContextRegistry ctxRegistry = gcr.getComponent(SerializationContextRegistry.class);
    ctxRegistry.addContextInitializer(SerializationContextRegistry.MarshallerType.PERSISTENCE, new PersistenceContextInitializerImpl());
    ctxRegistry.addContextInitializer(SerializationContextRegistry.MarshallerType.GLOBAL, MarshallerRegistration.INSTANCE);
    initProtobufMetadataManager(bcr);
    EmbeddedCacheManager cacheManager = gcr.getComponent(EmbeddedCacheManager.class);
    cacheManager.getClassAllowList().addClasses(QueryRequest.class, QueryRequestExternalizer.class);
}
Also used : IckleContinuousQueryProtobufCacheEventFilterConverter(org.infinispan.query.remote.impl.filter.IckleContinuousQueryProtobufCacheEventFilterConverter) IckleProtobufFilterAndConverter(org.infinispan.query.remote.impl.filter.IckleProtobufFilterAndConverter) IckleBinaryProtobufFilterAndConverter(org.infinispan.query.remote.impl.filter.IckleBinaryProtobufFilterAndConverter) EmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager) FilterResultExternalizer(org.infinispan.query.remote.impl.filter.FilterResultExternalizer) BasicComponentRegistry(org.infinispan.factories.impl.BasicComponentRegistry) SerializationContextRegistry(org.infinispan.marshall.protostream.impl.SerializationContextRegistry) PersistenceContextInitializerImpl(org.infinispan.query.remote.impl.persistence.PersistenceContextInitializerImpl) IckleProtobufCacheEventFilterConverter(org.infinispan.query.remote.impl.filter.IckleProtobufCacheEventFilterConverter) AdvancedExternalizer(org.infinispan.commons.marshall.AdvancedExternalizer) ContinuousQueryResultExternalizer(org.infinispan.query.remote.impl.filter.ContinuousQueryResultExternalizer)

Aggregations

AdvancedExternalizer (org.infinispan.commons.marshall.AdvancedExternalizer)1 BasicComponentRegistry (org.infinispan.factories.impl.BasicComponentRegistry)1 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)1 SerializationContextRegistry (org.infinispan.marshall.protostream.impl.SerializationContextRegistry)1 ContinuousQueryResultExternalizer (org.infinispan.query.remote.impl.filter.ContinuousQueryResultExternalizer)1 FilterResultExternalizer (org.infinispan.query.remote.impl.filter.FilterResultExternalizer)1 IckleBinaryProtobufFilterAndConverter (org.infinispan.query.remote.impl.filter.IckleBinaryProtobufFilterAndConverter)1 IckleContinuousQueryProtobufCacheEventFilterConverter (org.infinispan.query.remote.impl.filter.IckleContinuousQueryProtobufCacheEventFilterConverter)1 IckleProtobufCacheEventFilterConverter (org.infinispan.query.remote.impl.filter.IckleProtobufCacheEventFilterConverter)1 IckleProtobufFilterAndConverter (org.infinispan.query.remote.impl.filter.IckleProtobufFilterAndConverter)1 PersistenceContextInitializerImpl (org.infinispan.query.remote.impl.persistence.PersistenceContextInitializerImpl)1