congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CountingFilter
Code IndexAdd Tabnine to your IDE (free)

How to use
CountingFilter
in
kieker.analysisteetime.plugin.filter.forward

Best Java code snippets using kieker.analysisteetime.plugin.filter.forward.CountingFilter (Showing top 4 results out of 315)

origin: kieker-monitoring/kieker

/**
 * Initializes a new filter and array of test elements before each test.
 */
@Before
public void initializeNewFilter() {
  this.countingFilter = new CountingFilter();
  this.testElements = new ArrayList<>();
}
origin: kieker-monitoring/kieker

/**
 * This method represents the input port of this filter.
 *
 * @param event
 *            The next event.
 */
@Override
protected void execute(final Object event) {
  final Long count = this.counter.incrementAndGet();
  this.updateDisplays();
  this.relayedEventsOutputPort.send(event);
  this.countOutputPort.send(count);
}
origin: kieker-monitoring/kieker

/**
 * A simple test for the counting filter.
 */
@Test
public void testNormal() {
  this.testElements.add(new Object());
  this.testElements.add(new Object());
  this.testElements.add(new Object());
  Assert.assertEquals(0, this.countingFilter.getMessageCount());
  StageTester.test(this.countingFilter).and().send(this.testElements).to(this.countingFilter.getInputPort()).start();
  Assert.assertEquals(3, this.countingFilter.getMessageCount());
}
origin: kieker-monitoring/kieker

  /**
   * A simple test for the counting filter using objects of different classes.
   */
  @Test
  public void testDifferentClasses() {
    this.testElements.add(Long.valueOf(10));
    this.testElements.add(new Object());
    this.testElements.add("");
    Assert.assertEquals(0, this.countingFilter.getMessageCount());
    StageTester.test(this.countingFilter).and().send(this.testElements).to(this.countingFilter.getInputPort()).start();
    Assert.assertEquals(3, this.countingFilter.getMessageCount());
  }
}
kieker.analysisteetime.plugin.filter.forwardCountingFilter

Javadoc

An instance of this class receives any objects, increments an intern thread-safe counter without printing any message and delivers the unchanged objects to the output. The value of the counter can be retrieved by connected to the respective output port using a corresponding method.

Most used methods

  • <init>
    Creates a new instance of this class and sets the time stamp of initialization.
  • getInputPort
  • getMessageCount
    Returns the number of objects received until now.
  • updateDisplays

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • Menu (java.awt)
  • Kernel (java.awt.image)
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Notification (javax.management)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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