BrightSide Workbench Full Report + Source Code
org.turro.queue.Tasks Class Reference
Inheritance diagram for org.turro.queue.Tasks:
Collaboration diagram for org.turro.queue.Tasks:

Public Member Functions

void run ()
 

Static Public Member Functions

static void execute ()
 
static void add (Task task)
 
static TaskQueue tasks ()
 
static boolean isInterrupted ()
 

Detailed Description

Member Function Documentation

◆ add()

static void org.turro.queue.Tasks.add ( Task  task)
static

Definition at line 42 of file Elephant/elephant/src/main/java/org/turro/queue/Tasks.java.

42  {
43  Tasks tasks = getInstance();
44  tasks.doAdd(task);
45  tasks.doExecute();
46  }
Here is the call graph for this function:

◆ execute()

static void org.turro.queue.Tasks.execute ( )
static

Definition at line 38 of file Elephant/elephant/src/main/java/org/turro/queue/Tasks.java.

38  {
39  getInstance().doExecute();
40  }
Here is the caller graph for this function:

◆ isInterrupted()

static boolean org.turro.queue.Tasks.isInterrupted ( )
static

Definition at line 52 of file Elephant/elephant/src/main/java/org/turro/queue/Tasks.java.

52  {
53  Thread t = getInstance().execution;
54  return t == null || t.isInterrupted();
55  }
Here is the caller graph for this function:

◆ run()

void org.turro.queue.Tasks.run ( )

Definition at line 86 of file Elephant/elephant/src/main/java/org/turro/queue/Tasks.java.

86  {
87  Iterator<Task> tasks = queue.iterator();
88  while(tasks.hasNext()) {
89  Task task = tasks.next();
90  if(task.getStatus().equals(TaskStatus.TASK_EXECUTING)) {
91  break;
92  } else if(task.getStatus().equals(TaskStatus.TASK_PENDING)) {
93  task.execute();
94  break;
95  } else if(task.getStatus().equals(TaskStatus.TASK_FAILED)) {
96  if(task.isReintent()) {
97  task.execute();
98  break;
99  } else if(isOld(task)) {
100  tasks.remove();
101  }
102  } else {
103  if(isOld(task)) {
104  tasks.remove();
105  }
106  }
107  }
108  }
Here is the call graph for this function:

◆ tasks()

static TaskQueue org.turro.queue.Tasks.tasks ( )
static

Definition at line 48 of file Elephant/elephant/src/main/java/org/turro/queue/Tasks.java.

48  {
49  return getInstance().queue;
50  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: