public class SquareQueue<K,V>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
SquareQueue.SubQueue |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
name |
protected java.util.concurrent.ConcurrentLinkedQueue<SquareQueue.SubQueue> |
queue |
protected java.util.concurrent.ConcurrentHashMap<K,SquareQueue.SubQueue> |
subQueues |
| Constructor and Description |
|---|
SquareQueue(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName() |
int |
getSQSize() |
int |
getSQUnqueuedSize() |
void |
insert(K key,
V value) |
void |
insert(java.util.List<K> keys,
V value) |
static void |
main(java.lang.String[] args) |
SquareQueue.SubQueue |
remove() |
void |
removeKey(K key) |
void |
requeue(SquareQueue.SubQueue subQueue) |
protected java.util.concurrent.ConcurrentHashMap<K,SquareQueue.SubQueue> subQueues
protected java.util.concurrent.ConcurrentLinkedQueue<SquareQueue.SubQueue> queue
protected java.lang.String name
public SquareQueue.SubQueue remove() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void requeue(SquareQueue.SubQueue subQueue)
public void removeKey(K key)
public int getSQSize()
public int getSQUnqueuedSize()
public java.lang.String getName()
public static void main(java.lang.String[] args)