All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.thksystems.util.concurrent.scalingworkerqueue.WorkerQueueConfiguration Maven / Gradle / Ivy

Go to download

Commons for lang, crypto, xml, dom, text, csv, reflection, annotations, parsing, ...

There is a newer version: 4.4.0
Show newest version
/*
 * tksCommons
 *
 * Author  : Thomas Kuhlmann (ThK-Systems, https://www.thk-systems.de)
 * License : LGPL (https://www.gnu.org/licenses/lgpl.html)
 */

package de.thksystems.util.concurrent.scalingworkerqueue;

public interface WorkerQueueConfiguration {

    /**
     * Period (in ms) the dispatcher / or runner sleeps between checks
     */
    long getSleepPeriod();

    /**
     * Count of sleep periods sleeping on an error during dispatcher run.
     */
    int getSleepPeriodCountOnError();

    /**
     * Period (ms) to wait on empty fetch.
     */
    long getDispatcherWaitPeriodOnEmptyFetch();

    /**
     * Count of elements per runner.
     */
    int getCountOfElementsPerRunner();

    /**
     * Minimum count of elements to supply (independent of count of runners).
     */
    int getMinElementsCountToSupply();

    /**
     * Get count of spare elements to supply beyond the count of elements given by the count of running runners.
     */
    int getSpareElementsCountToSupply();

    /**
     * Minimum count of runners.
     */
    int getMinRunnerCount();

    /**
     * Maximum count of runners.
     */
    int getMaxRunnerCount();

    /**
     * Period (in ms) the runners sleeps, if it is idle. (Before it tries to get the next element.)
     */
    long getRunnerSleepIdlePeriod();

    /**
     * Maximum idle period (in ms) of a runner. If this period is exceeded, the runner is stopped (if possible).
     */
    long getRunnerMaxIdlePeriod();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy