Package com.linkedin.databus.core

Examples of com.linkedin.databus.core.DbusEventInternalReadable.sequence()


      if (traceEnabled) _log.trace("Got event:" + nextEvent);
      Long eventSrcId = (long)nextEvent.srcId();
      if (curState.isSCNRegress())
      {
        SingleSourceSCN scn = new SingleSourceSCN(nextEvent.physicalPartitionId(),
                                                  nextEvent.sequence());
        _log.info("We are regressing to SCN: " + scn);
        curState.switchToRollback();
        doRollback(curState, scn, false, false);
        curState.setSCNRegress(false);
        curState.switchToExpectEventWindow();
View Full Code Here


        curState.switchToExpectEventWindow();
      }

      if (null != getAsyncCallback().getStats())
        getAsyncCallback().getStats().registerWindowSeen(nextEvent.timestampInNanos(),
                                                         nextEvent.sequence());

      if (nextEvent.isControlMessage())
      {
      //control event
        if (nextEvent.isEndOfPeriodMarker())
View Full Code Here

            }

            SCN endWinScn = null;
            if (success)
            {
              _lastWindowScn = nextEvent.sequence();
              _lastEowTsNsecs = nextEvent.timestampInNanos();
              endWinScn = new SingleSourceSCN(nextEvent.physicalPartitionId(),
                                              _lastWindowScn);
              curState.switchToEndStreamEventWindow(endWinScn);
              success = doEndStreamEventWindow(curState);
View Full Code Here

          {
            //empty window
            success = true;
            if (_log.isDebugEnabled())
            {
              _log.debug("skipping empty window: " + nextEvent.sequence());
            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
View Full Code Here

            {
              _log.debug("skipping empty window: " + nextEvent.sequence());
            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
                _lastWindowScn = nextEvent.sequence();
                //the first window (startEvents()) can have a eop whose sequence() is non-zero but timestamp 0 e.g. in chained relay .
                //The reason is that the eop's timestamp is the max timestamp of all data events seen so far.
                if (nextEvent.timestampInNanos() > 0)
View Full Code Here

            }

            //write a checkpoint; takes care of slow sources ; but skip storing the first control eop with 0 scn
            if (nextEvent.sequence() > 0)
            {
                _lastWindowScn = nextEvent.sequence();
                //the first window (startEvents()) can have a eop whose sequence() is non-zero but timestamp 0 e.g. in chained relay .
                //The reason is that the eop's timestamp is the max timestamp of all data events seen so far.
                if (nextEvent.timestampInNanos() > 0)
                {
                  _lastEowTsNsecs = nextEvent.timestampInNanos();
View Full Code Here

                }
                Checkpoint ckpt = createCheckpoint(curState, nextEvent);
                try
                {
                     success = doStoreCheckpoint(curState, nextEvent, ckpt,
                            new SingleSourceSCN(nextEvent.physicalPartitionId(),nextEvent.sequence()));
                }
                catch (SharedCheckpointException e)
                {
                    //shutdown
                    return;
View Full Code Here

                    return;
                }
            }
            else
            {
                _log.warn("EOP with scn=" + nextEvent.sequence());
            }
          }
          if (success)
          {
            curState.switchToExpectEventWindow();
View Full Code Here

          }
          if (success)
          {
            curState.switchToExpectEventWindow();
            //we have recovered from the error  and it's not the dummy window
            if (nextEvent.sequence() > 0)
            {
              if (! getStatus().isRunningStatus()) getStatus().resume();
            }
          }
        }
View Full Code Here

            }
          }
        }
        else if (nextEvent.isErrorEvent())
        {
          _log.info("Error event: " + nextEvent.sequence());
          success = processErrorEvent(curState, nextEvent);
        }
        else
        {
          //control event
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.