anon.util
Class JobQueue.Job

java.lang.Object
  extended by anon.util.JobQueue.Job
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
JAPController.SetAnonModeAsync
Enclosing class:
JobQueue

public abstract static class JobQueue.Job
extends java.lang.Object
implements java.lang.Runnable

A job that may be added to the job queue.


Field Summary
private  boolean m_bMayBeSkippedIfDuplicate
           
private  JobQueue m_queue
           
 
Constructor Summary
JobQueue.Job()
          Creates a new job for that mayBeSkippedIfDuplicate() returns false.
JobQueue.Job(boolean a_bMayBeSkippedIfDuplicate)
          Creates a new job.
 
Method Summary
 java.lang.String getAddedJobLogMessage()
          Optional message for a log entry that is generated if a new job was added and this value is not null.
 boolean isInterrupting()
           
 boolean isSkippedIfDuplicate()
          If a new thread is added to the queue and mayBeSkippedIfDuplicate() returns true, it is skipped if another thread with the same value already is in the queue.
 void run()
           
abstract  void runJob()
          Replaces the run method as the normal run method is implemented by Job itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bMayBeSkippedIfDuplicate

private boolean m_bMayBeSkippedIfDuplicate

m_queue

private JobQueue m_queue
Constructor Detail

JobQueue.Job

public JobQueue.Job(boolean a_bMayBeSkippedIfDuplicate)
Creates a new job.

Parameters:
a_bMayBeSkippedIfDuplicate - if this thread is skipped if another thread with the same value already is in the queue

JobQueue.Job

public JobQueue.Job()
Creates a new job for that mayBeSkippedIfDuplicate() returns false.

Method Detail

runJob

public abstract void runJob()
Replaces the run method as the normal run method is implemented by Job itself. This method holds the things the job should do.


run

public final void run()
Specified by:
run in interface java.lang.Runnable

getAddedJobLogMessage

public java.lang.String getAddedJobLogMessage()
Optional message for a log entry that is generated if a new job was added and this value is not null.

Returns:
optional message for a log entry that is generated if a new job was added

isInterrupting

public boolean isInterrupting()

isSkippedIfDuplicate

public final boolean isSkippedIfDuplicate()
If a new thread is added to the queue and mayBeSkippedIfDuplicate() returns true, it is skipped if another thread with the same value already is in the queue.

Returns:
if this thread is skipped if another thread with the same value already is in the queue