public interface ScheduleQueue
GenericOperationThread
share a single queue.
The ScheduledQueue also support priority tasks; so if a task with a priority comes in, than
that one is taken before any other normal operation is taken.
The ordering between normal tasks will always be FIFO. And the same goes for the ordering between
priority tasks, but there is no ordering guarantee between priority and normal tasks.Modifier and Type | Method and Description |
---|---|
void |
add(Object task)
Adds an task with normal priority to this queue.
|
void |
addUrgent(Object task)
Adds an task with normal priority to this queue.
|
int |
normalSize()
returns the number of normal operations pending.
|
int |
prioritySize()
returns the number of priority operations pending.
|
int |
size()
Returns the total number of pending operations.
|
Object |
take()
Takes an item from this queue.
|
void add(Object task)
task
- the item to addNullPointerException
- if task is nullvoid addUrgent(Object task)
task
- the item to addNullPointerException
- if task is nullObject take() throws InterruptedException
InterruptedException
- if the thread is interrupted while waiting.int normalSize()
int prioritySize()
int size()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.