Tabnine Logo
StreamEventIterator
Code IndexAdd Tabnine to your IDE (free)

How to use
StreamEventIterator
in
com.activequant.domainmodel.streaming

Best Java code snippets using com.activequant.domainmodel.streaming.StreamEventIterator (Showing top 3 results out of 315)

origin: activequant/aq2o

public boolean moreDataInPipe() {
  for (StreamEventIterator<StreamEvent> it : iterators)
    if (it.hasNext())
      return true;
  return false;
}
origin: activequant/aq2o

public FastStreamer(  StreamEventIterator<StreamEvent>[] it) {
  this.iterators = it;
  // initialize also the headstart data. 
  containers =  new FastStreamEventContainer[it.length]; 
  for (int i = 0; i < it.length; i++) {
    if (it[i].hasNext()) {
      
      StreamEvent payload = it[i].next();
      if(containers[i] == null)
        containers[i] = new FastStreamEventContainer(i);
      FastStreamEventContainer fs = containers[i];
      fs.streamEvent=payload;
      fastQueue.add(fs);
    }
  }
  // sort all events once. 
  Collections.sort(fastQueue);
}
origin: activequant/aq2o

/**
 * Fetches the next stream event from the pipe. 
 * @return
 */
public StreamEvent getOneFromPipes()
{
  StreamEvent ret = null;
  if(!fastQueue.isEmpty()){
    FastStreamEventContainer event = fastQueue.get(0);
    if(event==null)return null;
    fastQueue.remove(0);
    ret = event.streamEvent;
    if(iterators[event.internalStreamId].hasNext())
    {
      StreamEvent payload = iterators[event.internalStreamId].next();
      FastStreamEventContainer newEvent = new FastStreamEventContainer(event.internalStreamId); 						
      newEvent.streamEvent=payload;                
      fastQueue.add(newEvent);
      Collections.sort(fastQueue);
      
      //
      // dumpQueue();
      
    }
    // log.info(ret.getTimeStamp().getNanoseconds() + " -  " + ret.getTimeStamp().getDate() + " - " + ret.toString());
  }
  return ret; 
}

com.activequant.domainmodel.streamingStreamEventIterator

Most used methods

  • hasNext
  • next

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now