Package org.infinispan.protostream

Examples of org.infinispan.protostream.ProtobufParser


   private void decodeAndIndex(byte[] bytes, Document document, LuceneOptions luceneOptions) {
      //todo [anistor] the SerializationContext should somehow be injected here rather than getting it from a static holder
      SerializationContext serCtx = SerializationContextHolder.getSerializationContext();
      Descriptors.Descriptor wrapperDescriptor = serCtx.getMessageDescriptor(WrappedMessage.PROTOBUF_TYPE_NAME);
      try {
         new ProtobufParser().parse(new WrappedMessageTagHandler(document, luceneOptions, serCtx), wrapperDescriptor, bytes);
      } catch (IOException e) {
         throw new CacheException(e);
      }
   }
View Full Code Here


   private void decodeAndIndex(byte[] bytes, Document document, LuceneOptions luceneOptions) {
      SerializationContext serCtx = ProtobufMetadataManager.getSerializationContext(cache.getCacheManager());
      Descriptors.Descriptor wrapperDescriptor = serCtx.getMessageDescriptor(WrappedMessage.PROTOBUF_TYPE_NAME);
      try {
         new ProtobufParser().parse(new WrappedMessageTagHandler(document, luceneOptions, serCtx), wrapperDescriptor, bytes);
      } catch (IOException e) {
         throw new CacheException(e);
      }
   }
View Full Code Here

         //todo [anistor] tag ordering could be wrong ...
         case wrappedMessageBytes:
            byte[] bytes = (byte[]) value;
            try {
               luceneOptions.addFieldToDocument(QueryFacadeImpl.TYPE_FIELD_NAME, messageDescriptor.getFullName(), document);
               new ProtobufParser().parse(new IndexingTagHandler(messageDescriptor, document, luceneOptions), messageDescriptor, bytes);
            } catch (IOException e) {
               throw new CacheException(e);
            }
            break;
         default:
View Full Code Here

      if (wrapperDescriptor == null) {
         wrapperDescriptor = serializationContext.getMessageDescriptor(WrappedMessage.PROTOBUF_TYPE_NAME);
      }

      try {
         new ProtobufParser().parse(new WrappedMessageTagHandler(document, luceneOptions, serializationContext), wrapperDescriptor, bytes);
      } catch (IOException e) {
         throw new CacheException(e);
      }
   }
View Full Code Here

      if (bytes != null) {
         if (messageDescriptor == null) {
            throw new IllegalStateException("Descriptor name is missing");
         }
         try {
            new ProtobufParser().parse(new IndexingTagHandler(messageDescriptor, document), messageDescriptor, bytes);
         } catch (IOException e) {
            throw new CacheException(e);
         }
      } else if (numericValue != null) {
         //todo [anistor] how do we index a scalar value?
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.ProtobufParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.