public class AddressDeque extends LocalDeque
Modifier and Type | Field and Description |
---|---|
String |
name |
head
queue, tail, tailBufferEnd
BUFFER_MASK, BUFFER_SIZE, HEAD_INITIAL_VALUE, LOG_PAGES_PER_BUFFER, META_DATA_SIZE, NEXT_FIELD_OFFSET, PAGES_PER_BUFFER, TAIL_INITIAL_VALUE, USABLE_BUFFER_BYTES
Constructor and Description |
---|
AddressDeque(String n,
SharedDeque queue)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
insert(Address addr)
Insert an address into the address queue.
|
void |
insertOOL(Address addr)
Insert an address into the address queue, force this out of line
("OOL"), in some circumstances it is too expensive to have the
insert inlined, so this call is made.
|
boolean |
isEmpty() |
boolean |
isNonEmpty() |
Address |
pop()
Pop an address from the address queue, return zero if the queue
is empty.
|
void |
push(Address addr)
Push an address onto the address queue.
|
void |
pushOOL(Address addr)
Push an address onto the address queue, force this out of line
("OOL"), in some circumstances it is too expensive to have the
push inlined, so this call is made.
|
checkHeadInsert, flushLocal, uncheckedHeadInsert
checkDequeue, headStarved, resetLocal, uncheckedDequeue
bufferSentinel, checkTailInsert, isFlushed, normalizeTail, reset, uncheckedTailInsert
bufferEnd, bufferFirst, bufferLast, bufferLast, bufferLastOffset, bufferOffset, bufferStart
public AddressDeque(String n, SharedDeque queue)
n
- the human-readable name of this queuequeue
- The shared queue to which this queue will append
its buffers (when full or flushed) and from which it will aquire new
buffers when it has exhausted its own.public final void insert(Address addr)
addr
- the address to be inserted into the address queuepublic final void insertOOL(Address addr)
addr
- the address to be inserted into the address queuepublic final void push(Address addr)
addr
- the address to be pushed onto the address queuepublic final void pushOOL(Address addr)
addr
- the address to be pushed onto the address queuepublic final Address pop()
public final boolean isEmpty()
public final boolean isNonEmpty()