org.wso2.extension.siddhi.execution.ml.samoa.utils

## Class SourceProcessor

- java.lang.Object
- - org.wso2.extension.siddhi.execution.ml.samoa.utils.SourceProcessor

- All Implemented Interfaces:
    com.github.javacliparser.Configurable, Serializable, org.apache.samoa.core.EntranceProcessor, org.apache.samoa.core.Processor
  Direct Known Subclasses:
    StreamingClassificationEntranceProcessor, StreamingClusteringEntranceProcessor, StreamingRegressionEntranceProcessor

      public abstract class SourceProcessor
      extends Object
      implements org.apache.samoa.core.EntranceProcessor

  Source : https://github.com/apache/incubator-samoa/blob/master/samoa-api/src/main/java/org/ apache/samoa/streams/PrequentialSourceProcessor.java
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `delay`
    `protected boolean` | `finished`
    `protected org.apache.samoa.instances.Instance` | `firstInstance`
    `protected int` | `maxEvents`
    `protected int` | `numberOfInstancesSent`
    `protected ScheduledFuture<?>` | `schedule`
    `protected ScheduledExecutorService` | `timer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SourceProcessor()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.samoa.instances.Instances` | `getDataset()`
    `protected org.apache.samoa.streams.StreamSource` | `getStreamSource()`
    `boolean` | `hasNext()`
    `protected boolean` | `hasReachedEndOfStream()`
    `protected void` | `increaseReadyEventIndex()`
    `boolean` | `isFinished()`
    `abstract org.apache.samoa.core.Processor` | `newProcessor(org.apache.samoa.core.Processor p)`
    `abstract org.apache.samoa.core.ContentEvent` | `nextEvent()`
    `protected org.apache.samoa.instances.Instance` | `nextInstance()`
    `void` | `onCreate(int id)`
    `boolean` | `process(org.apache.samoa.core.ContentEvent event)`
    `void` | `setDelayBatchSize(int batch)`
    `void` | `setMaxEvents(int value)`
    `void` | `setSourceDelay(int delay)`
    `void` | `setStreamSource(org.apache.samoa.streams.InstanceStream stream)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### timer

          protected transient ScheduledExecutorService timer

    - #### schedule

          protected transient ScheduledFuture<?> schedule

    - #### delay

          protected int delay

    - #### firstInstance

          protected org.apache.samoa.instances.Instance firstInstance

    - #### maxEvents

          protected int maxEvents

    - #### numberOfInstancesSent

          protected int numberOfInstancesSent

    - #### finished

          protected boolean finished

  - ### Constructor Detail

    - #### SourceProcessor

          public SourceProcessor()

  - ### Method Detail

    - #### nextEvent

          public abstract org.apache.samoa.core.ContentEvent nextEvent()

      Specified by:
        `nextEvent` in interface `org.apache.samoa.core.EntranceProcessor`

    - #### newProcessor

          public abstract org.apache.samoa.core.Processor newProcessor(org.apache.samoa.core.Processor p)

      Specified by:
        `newProcessor` in interface `org.apache.samoa.core.Processor`

    - #### process

          public boolean process(org.apache.samoa.core.ContentEvent event)

      Specified by:
        `process` in interface `org.apache.samoa.core.Processor`

    - #### onCreate

          public void onCreate(int id)

      Specified by:
        `onCreate` in interface `org.apache.samoa.core.EntranceProcessor`
      Specified by:
        `onCreate` in interface `org.apache.samoa.core.Processor`

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `org.apache.samoa.core.EntranceProcessor`

    - #### isFinished

          public boolean isFinished()

      Specified by:
        `isFinished` in interface `org.apache.samoa.core.EntranceProcessor`

    - #### hasReachedEndOfStream

          protected boolean hasReachedEndOfStream()

    - #### setStreamSource

          public void setStreamSource(org.apache.samoa.streams.InstanceStream stream)

    - #### nextInstance

          protected org.apache.samoa.instances.Instance nextInstance()

    - #### increaseReadyEventIndex

          protected void increaseReadyEventIndex()

    - #### getDataset

          public org.apache.samoa.instances.Instances getDataset()

    - #### setMaxEvents

          public void setMaxEvents(int value)

    - #### setSourceDelay

          public void setSourceDelay(int delay)

    - #### setDelayBatchSize

          public void setDelayBatchSize(int batch)

    - #### getStreamSource

          protected org.apache.samoa.streams.StreamSource getStreamSource()

Copyright © 2017 WSO2. All rights reserved.