com.path.android.jobqueue.executor
Interface JobConsumerExecutor.Contract

Enclosing class:
JobConsumerExecutor

public static interface JobConsumerExecutor.Contract

contract between the JobManager and JobConsumerExecutor


Method Summary
 int countRemainingReadyJobs()
           
 JobHolder getNextJob(int wait, java.util.concurrent.TimeUnit waitUnit)
          should return the next job which is available to be run.
 void insertOrReplace(JobHolder jobHolder)
          should insert the given JobHolder to related JobQueue.
 boolean isRunning()
           
 void removeJob(JobHolder jobHolder)
          should remove the job from the related JobQueue
 

Method Detail

isRunning

boolean isRunning()
Returns:
if JobManager is currently running.

insertOrReplace

void insertOrReplace(JobHolder jobHolder)
should insert the given JobHolder to related JobQueue. if it already exists, should replace the existing one.

Parameters:
jobHolder -

removeJob

void removeJob(JobHolder jobHolder)
should remove the job from the related JobQueue

Parameters:
jobHolder -

getNextJob

JobHolder getNextJob(int wait,
                     java.util.concurrent.TimeUnit waitUnit)
should return the next job which is available to be run.

Parameters:
wait -
waitUnit -
Returns:
next job to execute or null if no jobs are available

countRemainingReadyJobs

int countRemainingReadyJobs()
Returns:
the number of Jobs that are ready to be run