org.apache.droids.queue
Class Simple

Package class diagram package Simple
java.lang.Object
  extended by org.apache.droids.queue.QueueBean
      extended by org.apache.droids.queue.Simple
All Implemented Interfaces:
Queue

public class Simple
extends QueueBean
implements Queue


Field Summary
 
Fields inherited from class org.apache.droids.queue.QueueBean
log
 
Constructor Summary
Simple()
          Simple queue constructor.
 
Method Summary
 Task getTask(String id)
          Return the task that is identified with the given id
 boolean hasNext()
          Do we have more task waiting for service
 void init(Task[] initialTask)
          Create the initial task list as queue
 void merge(Task[] filterLinks)
          Merge a given list of tasks with the current queue.
 Task next()
          Return the next task that is waiting for service
 int totalSize()
          How many task do we have left in the queue.
 
Methods inherited from class org.apache.droids.queue.QueueBean
acceptDepth, acceptSize, currentSize, getCurrentSize, getDoneTasks, getMaxDepth, getMaxSize, getToDoTasks, setCurrentSize, setDoneTasks, setMaxDepth, setMaxSize, setToDoTasks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Simple

public Simple()
Simple queue constructor.

Method Detail

getTask

public Task getTask(String id)
Description copied from interface: Queue
Return the task that is identified with the given id

Specified by:
getTask in interface Queue
Parameters:
id - of the task we want
Returns:
the task idenfied by the given id

totalSize

public int totalSize()
Description copied from interface: Queue
How many task do we have left in the queue.

Specified by:
totalSize in interface Queue
Returns:
number of tasks do we have left in the queue.

init

public void init(Task[] initialTask)
Description copied from interface: Queue
Create the initial task list as queue

Specified by:
init in interface Queue
Parameters:
initialTask - initial list of tasks

hasNext

public boolean hasNext()
Description copied from interface: Queue
Do we have more task waiting for service

Specified by:
hasNext in interface Queue
Returns:
true if we have. false otherwise

merge

public void merge(Task[] filterLinks)
Description copied from interface: Queue
Merge a given list of tasks with the current queue. Whether or not we eliminate double entries is up to the implementation

Specified by:
merge in interface Queue
Parameters:
filterLinks - the list of task that we want to add to the queue

next

public Task next()
Description copied from interface: Queue
Return the next task that is waiting for service

Specified by:
next in interface Queue
Returns:
next task in line.


Copyright © 2008 The Apache Software Foundation