Package com.linkedin.databus.core

Examples of com.linkedin.databus.core.DbusEventV2Factory


      cfgBuilder.getTrace().setFilename(tmpFile.getAbsolutePath());
      cfgBuilder.getTrace().setNeedFileSuffix(true);

      //test that the first gets created
      PhysicalPartition pp = new PhysicalPartition(1, "TestPart");
      DbusEventFactory eventFactory = new DbusEventV2Factory();
      DbusEventBuffer buf1 = new DbusEventBuffer(cfgBuilder.build(), pp, eventFactory);
      buf1Trace = new File(tmpFile.getAbsolutePath() + "." + pp.getName() + "_" + pp.getId());
      Assert.assertTrue(buf1Trace.exists());

      buf1.start(1);
View Full Code Here


    {
      cp.setBootstrapStartScn(0L);
    }
    cp.setWindowScn(lastScn);
    cp.setSnapshotOffset(dataEventCount);
    DbusEventInternalReadable ev = new DbusEventV2Factory().createCheckpointEvent(cp);
    ByteBuffer b = ev.value();
    byte[] bytes = new byte[b.remaining()];
    b.get(bytes);
    for (int i=0;i < numCheckpoints;++i)
    {
View Full Code Here

    {
      eventFactory = new DbusEventV1Factory();
    }
    else if (version == DbusEventFactory.DBUS_EVENT_V2)
    {
      eventFactory = new DbusEventV2Factory();
    }
    else
    {
      throw new UnsupportedDbusEventVersionRuntimeException(version);
    }
View Full Code Here

                                                false,  // enable tracing
                                                true,  // auto-commit
                                                DbusEventFactory.DBUS_EVENT_V2,
                                                PAYLOAD_SCHEMA_VERSION,
                                                metadataPart);
    DbusEventFactory eventFactory = new DbusEventV2Factory();
    DbusEventKey eventKey = new DbusEventKey(LONG_KEY);
    ByteBuffer serialBuf = ByteBuffer.allocate(maxEventLen).order(eventFactory.getByteOrder());
    DbusEventFactory.serializeEvent(eventKey, serialBuf, eventInfo);

    return eventFactory.createReadOnlyDbusEventFromBuffer(serialBuf, 0);
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.core.DbusEventV2Factory

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.