Codota Logo
Engine.acquirePermit
Code IndexAdd Codota to your IDE (free)

How to use
acquirePermit
method
in
com.linkedin.parseq.Engine

Best Java code snippets using com.linkedin.parseq.Engine.acquirePermit (Showing top 2 results out of 315)

  • Common ways to obtain Engine
private void myMethod () {
Engine e =
  • Codota IconExecutor executor;Executor taskExecutor;new EngineBuilder().setTaskExecutor(executor).setTimerScheduler(taskExecutor).build()
  • Codota IconEngineBuilder engineBuilder;engineBuilder.build()
  • Smart code suggestions by Codota
}
origin: linkedin/parseq

/**
 * Runs the given task. Task passed in as a parameter becomes a root on a new Plan.
 * All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
 * <p>
 * This method blocks until Engine has a capacity to run the task. Engine's capacity is
 * specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
 * {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
 * For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
 * {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
 *
 * @param task the task to run
 * @param planClass string that identifies a "class" of the Plan. Plan class ends up in a ParSeq
 * Trace and can be used to group traces into "classes" when traces are statistically analyzed.
 */
public void blockingRun(final Task<?> task, final String planClass) {
 try {
  acquirePermit(planClass);
  runWithPermit(task, planClass);
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
}
origin: com.linkedin.parseq/parseq

/**
 * Runs the given task. Task passed in as a parameter becomes a root on a new Plan.
 * All tasks created and started as a consequence of a root task will belong to that plan and will share a Trace.
 * <p>
 * This method blocks until Engine has a capacity to run the task. Engine's capacity is
 * specified by a {@value #MAX_CONCURRENT_PLANS} configuration property. Use
 * {@link EngineBuilder#setEngineProperty(String, Object)} to set this property.
 * For the sake of backwards compatibility default value for a {@value #MAX_CONCURRENT_PLANS} is
 * {@value #DEFUALT_MAX_CONCURRENT_PLANS} which essentially means "unbounded capacity".
 *
 * @param task the task to run
 * @param planClass string that identifies a "class" of the Plan. Plan class ends up in a ParSeq
 * Trace and can be used to group traces into "classes" when traces are statistically analyzed.
 */
public void blockingRun(final Task<?> task, final String planClass) {
 try {
  acquirePermit(planClass);
  runWithPermit(task, planClass);
 } catch (InterruptedException e) {
  Thread.currentThread().interrupt();
 }
}
com.linkedin.parseqEngineacquirePermit

Popular methods of Engine

  • run
    Runs the given task. Task passed in as a parameter becomes a root on a new Plan. All tasks created a
  • shutdown
    If the engine is currently running, this method will initiate an orderly shutdown. No new tasks will
  • blockingRun
    Runs the given task. Task passed in as a parameter becomes a root on a new Plan. All tasks created a
  • tryRun
    Runs the given task if Engine has a capacity to start new plan as specified by #MAX_CONCURRENT_PLANS
  • <init>
  • createTaskQueueFactory
  • defaultPlanClass
  • getProperty
  • runWithPermit
    Runs the given task with its own context. Use Tasks.seq and Tasks.par to create and run composite ta
  • tryAcquirePermit
  • tryTransitionShutdown
  • tryTransitionTerminate
  • tryTransitionShutdown,
  • tryTransitionTerminate,
  • awaitTermination,
  • isShutdown,
  • isTerminated

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • onCreateOptionsMenu (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now