@InterfaceAudience.Private abstract class Queue<TKey extends Comparable<TKey>> extends AvlUtil.AvlLinkedNode<Queue<TKey>>
Modifier and Type | Field and Description |
---|---|
private TKey |
key |
private LockStatus |
lockStatus |
private int |
priority |
private ProcedureDeque |
runnables |
iterNext, iterPrev
avlHeight, avlLeft, avlRight
Modifier | Constructor and Description |
---|---|
protected |
Queue(TKey key,
int priority,
LockStatus lockStatus) |
protected |
Queue(TKey key,
LockStatus lockStatus) |
Modifier and Type | Method and Description |
---|---|
void |
add(Procedure<?> proc,
boolean addToFront) |
int |
compareKey(TKey cmpKey) |
int |
compareTo(Queue<TKey> other) |
protected TKey |
getKey() |
protected LockStatus |
getLockStatus() |
int |
getPriority() |
boolean |
isAvailable() |
boolean |
isEmpty() |
Procedure<?> |
peek() |
Procedure<?> |
poll() |
(package private) abstract boolean |
requireExclusiveLock(Procedure<?> proc) |
int |
size() |
String |
toString() |
private final TKey extends Comparable<TKey> key
private final int priority
private final ProcedureDeque runnables
private final LockStatus lockStatus
protected Queue(TKey key, LockStatus lockStatus)
protected Queue(TKey key, int priority, LockStatus lockStatus)
abstract boolean requireExclusiveLock(Procedure<?> proc)
proc
- must not be nullpublic int getPriority()
protected LockStatus getLockStatus()
public boolean isAvailable()
public boolean isEmpty()
public int size()
public int compareKey(TKey cmpKey)
public int compareTo(Queue<TKey> other)
compareTo
in class AvlUtil.AvlNode<Queue<TKey extends Comparable<TKey>>>
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.