com.hazelcast.spi.impl.operationexecutor.classic
public final class DefaultScheduleQueue extends Object implements ScheduleQueue
Constructor and Description |
---|
DefaultScheduleQueue() |
DefaultScheduleQueue(BlockingQueue normalQueue,
ConcurrentLinkedQueue priorityQueue) |
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.
|
public DefaultScheduleQueue()
public DefaultScheduleQueue(BlockingQueue normalQueue, ConcurrentLinkedQueue priorityQueue)
public void add(Object task)
ScheduleQueue
add
in interface ScheduleQueue
task
- the item to addpublic void addUrgent(Object task)
ScheduleQueue
addUrgent
in interface ScheduleQueue
task
- the item to addpublic int normalSize()
ScheduleQueue
normalSize
in interface ScheduleQueue
public int prioritySize()
ScheduleQueue
prioritySize
in interface ScheduleQueue
public int size()
ScheduleQueue
size
in interface ScheduleQueue
public Object take() throws InterruptedException
ScheduleQueue
take
in interface ScheduleQueue
InterruptedException
- if the thread is interrupted while waiting.Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.