Examples of readEvents()


Examples of com.linkedin.databus.core.DbusEventBuffer.readEvents()

      log.info("create some events");
      long windowScn = 100L;
      ByteBuffer serializationBuffer = addEvent(windowScn, srcId, relay1.getSchemaRegistryService().fetchSchemaIdForSourceNameAndVersion(srcs[0], 2).getByteArray(),
          pId, DbusEventFactory.DBUS_EVENT_V2);
      ReadableByteChannel channel = Channels.newChannel(new ByteBufferInputStream(serializationBuffer));
      int readEvents = buf.readEvents(channel);
      log.info("successfully read in " + readEvents + " events ");
      channel.close();

      windowScn = 101L;
      serializationBuffer = addEvent(windowScn, srcId, relay1.getSchemaRegistryService().fetchSchemaIdForSourceNameAndVersion(srcs[0], 2).getByteArray(),
View Full Code Here

Examples of com.linkedin.databus.core.DbusEventBuffer.readEvents()

      windowScn = 101L;
      serializationBuffer = addEvent(windowScn, srcId, relay1.getSchemaRegistryService().fetchSchemaIdForSourceNameAndVersion(srcs[0], 2).getByteArray(),
          pId, DbusEventFactory.DBUS_EVENT_V1);
      channel = Channels.newChannel(new ByteBufferInputStream(serializationBuffer));
      readEvents = buf.readEvents(channel);
      log.info("successfully read in " + readEvents + " events ");
      channel.close();

      log.info("starting relay on port " + relayPort);
      r1.start();
View Full Code Here

Examples of org.apache.flume.serialization.EventDeserializer.readEvents()

  public void testBatch() throws IOException {
    ResettableInputStream in = new ResettableTestStringInputStream(mini);
    EventDeserializer des = new BlobDeserializer(new Context(), in);
    List<Event> events;

    events = des.readEvents(10); // try to read more than we should have
    assertEquals(1, events.size());
    assertEventBodyEquals(mini, events.get(0));

    des.mark();
    des.close();
View Full Code Here

Examples of org.axonframework.eventstore.EventStore.readEvents()

                new GenericDomainEventMessage("todo2", 0, new ToDoItemCreatedEvent("todo2", "I also need to do this"))
        ));


        // now, we read the events from the "todo1" stream
        DomainEventStream upcastEvents = eventStore.readEvents("UpcasterSample", "todo1");
        while (upcastEvents.hasNext()) {
            // and print them, so that we can see what we ended up with
            System.out.println(upcastEvents.next().getPayload().toString());
        }
        IOUtils.closeQuietlyIfCloseable(upcastEvents);
View Full Code Here

Examples of org.axonframework.eventstore.fs.FileSystemEventStore.readEvents()

        eventStore.appendEvents("UpcasterSample", new SimpleDomainEventStream(
                new GenericDomainEventMessage("todo2", 0, new ToDoItemCreatedEvent("todo2", "I also need to do this"))
        ));

        // now, we read the events from the "todo1" stream
        DomainEventStream eventStream = eventStore.readEvents("UpcasterSample", "todo1");
        while (eventStream.hasNext()) {
            // and print them, so that we can see what we ended up with
            System.out.println(eventStream.next().getPayload().toString());
        }
        IOUtils.closeQuietlyIfCloseable(eventStream);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.