Added the ability to delete a queue

Updated todo
This commit is contained in:
Tristan B. Velloza Kildaire 2021-09-08 14:24:58 +02:00
parent 6d133a15ba
commit 4f83991baf
2 changed files with 19 additions and 1 deletions

View File

@ -110,6 +110,23 @@ public final class Manager
return newQueue;
}
public void removeQueue(Queue queue)
{
queuesLock.lock();
/* Make sure such a tag exists */
if(isValidTag(queue.getTag()))
{
queues.linearRemoveElement(queue);
}
else
{
/* TODO: Throw an error here */
}
queuesLock.unlock();
}
public void addQueue(Queue queue)
{
queuesLock.lock();

3
todo
View File

@ -6,4 +6,5 @@
- [ ] shutdown option
- [ ] Queue policies
- [x] Length cap
- [ ] Exceptions
- [ ] Exceptions
- [x] Queue deletion