Tabnine Logo
TaskState.isActiveOrSubmitted
Code IndexAdd Tabnine to your IDE (free)

How to use
isActiveOrSubmitted
method
in
org.sonatype.scheduling.TaskState

Best Java code snippets using org.sonatype.scheduling.TaskState.isActiveOrSubmitted (Showing top 2 results out of 315)

origin: org.sonatype.nexus/nexus-scheduler

public Map<String, List<ScheduledTask<?>>> getActiveTasks() {
 Map<String, List<ScheduledTask<?>>> result = getAllTasks();
 List<ScheduledTask<?>> tasks = null;
 // filter for activeOrSubmitted
 for (Iterator<String> c = result.keySet().iterator(); c.hasNext(); ) {
  String cls = c.next();
  tasks = result.get(cls);
  for (Iterator<ScheduledTask<?>> i = tasks.iterator(); i.hasNext(); ) {
   ScheduledTask<?> task = i.next();
   if (!task.getTaskState().isActiveOrSubmitted()) {
    i.remove();
   }
  }
  if (tasks.isEmpty()) {
   c.remove();
  }
 }
 return result;
}
origin: org.sonatype.sisu/sisu-task-scheduler

public Map<String, List<ScheduledTask<?>>> getActiveTasks()
{
  Map<String, List<ScheduledTask<?>>> result = getAllTasks();
  List<ScheduledTask<?>> tasks = null;
  // filter for activeOrSubmitted
  for ( Iterator<String> c = result.keySet().iterator(); c.hasNext(); )
  {
    String cls = c.next();
    tasks = result.get( cls );
    for ( Iterator<ScheduledTask<?>> i = tasks.iterator(); i.hasNext(); )
    {
      ScheduledTask<?> task = i.next();
      if ( !task.getTaskState().isActiveOrSubmitted() )
      {
        i.remove();
      }
    }
    if ( tasks.isEmpty() )
    {
      c.remove();
    }
  }
  return result;
}
org.sonatype.schedulingTaskStateisActiveOrSubmitted

Popular methods of TaskState

  • equals
  • isExecuting
  • isEndingState
  • isRunnable
  • toString
  • name

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JLabel (javax.swing)
  • JTable (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim plugins
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