congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DirectoryScannerStage
Code IndexAdd Tabnine to your IDE (free)

How to use
DirectoryScannerStage
in
kieker.analysisteetime.plugin.reader.filesystem

Best Java code snippets using kieker.analysisteetime.plugin.reader.filesystem.DirectoryScannerStage (Showing top 5 results out of 315)

origin: kieker-monitoring/kieker

private void scanDirectory(final File directory) {
  if (this.isKiekerDirectory(directory)) {
    this.logger.debug("Reading log data from {}", directory.getAbsolutePath());
    this.numOfDirectories++;
    this.getOutputPort().send(directory);
  } else {
    for (final File subDirectory : directory.listFiles()) { // NOFB is guaranteed to be a directory
      if (subDirectory.isDirectory()) {
        this.scanDirectory(subDirectory);
      }
    }
  }
}
origin: kieker-monitoring/kieker

/**
 * Execute the directory scanner.
 */
@Override
protected void execute() {
  if (this.directories != null) {
    for (final File directory : this.directories) {
      this.logger.debug("Scanning directories in {} for Kieker logs", directory);
      if (directory.isDirectory()) {
        this.scanDirectory(directory);
      }
    }
  } else {
    this.logger.error("Cannot process an empty array of directories.");
  }
  this.logger.debug("Processed {} directories.", this.numOfDirectories);
  this.workCompleted();
}
origin: kieker-monitoring/kieker

/**
 * Creates a composite stage to scan and read a set of Kieker log directories.
 *
 * @param configuration configuration for the enclosed filters
 */
public LogsReaderCompositeStage(final Configuration configuration) {
  final String[] directoryNames = configuration.getStringArrayProperty(LOG_DIRECTORIES, ":");
  final File[] directories = new File[directoryNames.length];
  int i = 0;
  for (final String name : directoryNames) {
    directories[i++] = new File(name);
  }
  this.directoryScannerStage = new DirectoryScannerStage(directories);
  this.directoryReaderStage = new DirectoryReaderStage(configuration);
  this.connectPorts(this.directoryScannerStage.getOutputPort(), this.directoryReaderStage.getInputPort());
}
origin: kieker-monitoring/kieker

/**
 * Check whether the scanner produces a File handle for each directory. There should be three
 * directories. However, the sequence can vary depending on the operating system and file system
 * properties. therefore, we use our own matcher.
 */
@Test
public void testPopulatedArrayOfDirectories() {
  final DirectoryScannerStage producer = new DirectoryScannerStage(this.directories);
  StageTester.test(producer).start();
  Assert.assertThat(producer.getOutputPort(), new RandomContentMatcher(this.results));
}
origin: kieker-monitoring/kieker

/**
 * Check whether the scanner produces nothing and terminates.
 */
@Test
public void testEmptyArrayOfDirectories() {
  final DirectoryScannerStage producer = new DirectoryScannerStage(null);
  StageTester.test(producer).start();
  Assert.assertThat(producer.getOutputPort(), StageTester.producesNothing());
}
kieker.analysisteetime.plugin.reader.filesystemDirectoryScannerStage

Javadoc

Scan a set of directories recursively for Kieker logs. This producer stage outputs File objects representing valid Kieker log directories.

Most used methods

  • <init>
    Create a directory scanner.
  • getOutputPort
  • isKiekerDirectory
  • scanDirectory
  • workCompleted

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Best plugins for Eclipse
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