Package org.infinispan.protostream

Examples of org.infinispan.protostream.ConfigurationBuilder


*/
public class ProtobufParsingTest extends AbstractParsingTest {

   @Override
   protected FilterProcessingChain<Descriptor> createFilterProcessingChain() throws IOException, Descriptors.DescriptorValidationException {
      SerializationContext serCtx = ProtobufUtil.newSerializationContext(new ConfigurationBuilder().build());
      MarshallerRegistration.registerMarshallers(serCtx);
      return FilterProcessingChain.build(new ProtobufPropertyHelper(serCtx), null);
   }
View Full Code Here


      user.setAddresses(addresses);
      return user;
   }

   private void readWithProtoStream(byte[] bytes, long[] result) throws IOException, DescriptorParserException {
      Configuration cfg = new ConfigurationBuilder().setLogOutOfSequenceReads(false).build();
      SerializationContext ctx = createContext(cfg);
      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);

      long tStart = System.nanoTime();
      for (int i = 0; i < NUM_INNER_LOOPS; i++) {
View Full Code Here

      result[0] = System.nanoTime() - tStart;
      log.infof("Java serialization read duration    = %d ns", result[0]);
   }

   private byte[] writeWithProtoStream(User user, long[] result) throws IOException, DescriptorParserException {
      Configuration cfg = new ConfigurationBuilder().setLogOutOfSequenceWrites(false).build();
      SerializationContext ctx = createContext(cfg);
      ByteArrayOutputStream out = new ByteArrayOutputStream(1024);

      long tStart = System.nanoTime();
      for (int i = 0; i < NUM_INNER_LOOPS; i++) {
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.ConfigurationBuilder

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.