public class QueueLong implements Verifiable
FIFO Queue with option to remove element from middle
Modifier and Type | Class and Description |
---|---|
static class |
QueueLong.Companion |
static class |
QueueLong.Node |
Modifier and Type | Field and Description |
---|---|
static QueueLong.Companion |
Companion |
Constructor and Description |
---|
QueueLong(Store store,
long tailRecid,
long headRecid,
long headPrevRecid)
FIFO Queue with option to remove element from middle
|
Modifier and Type | Method and Description |
---|---|
void |
bump(long nodeRecid,
long newTimestamp) |
void |
clear() |
void |
forEach(Function3<? super java.lang.Long,? super java.lang.Long,? super java.lang.Long,Unit> body) |
long |
getHead() |
long |
getHeadPrev() |
long |
getHeadPrevRecid() |
long |
getHeadRecid() |
Store |
getStore() |
long |
getTail() |
long |
getTailRecid() |
void |
printContent(java.io.PrintStream out) |
long |
put(long timestamp,
long value)
puts Node into queue, returns recid which represents this node
|
void |
put(long timestamp,
long value,
long nodeRecid)
puts Node into queue, returns recid which represents this node
|
QueueLong.Node |
remove(long nodeRecid,
boolean removeNode) |
void |
setHead(long value) |
void |
setHeadPrev(long value) |
void |
setTail(long value) |
long |
size() |
QueueLong.Node |
take() |
void |
takeUntil(QueueLongTakeUntil f)
Takes elements, until callback returns true. When callback returns false, last node is preserved in Queue
|
long[] |
valuesArray() |
void |
verify() |
verify
public static QueueLong.Companion Companion
public QueueLong(Store store, long tailRecid, long headRecid, long headPrevRecid)
FIFO Queue with option to remove element from middle
public long getTail()
public void setTail(long value)
public long getHead()
public void setHead(long value)
public long getHeadPrev()
public void setHeadPrev(long value)
public long put(long timestamp, long value)
puts Node into queue, returns recid which represents this node
public void put(long timestamp, long value, long nodeRecid)
puts Node into queue, returns recid which represents this node
public QueueLong.Node take()
public void takeUntil(QueueLongTakeUntil f)
Takes elements, until callback returns true. When callback returns false, last node is preserved in Queue
public QueueLong.Node remove(long nodeRecid, boolean removeNode)
public void bump(long nodeRecid, long newTimestamp)
public void clear()
public long size()
public void verify()
public long[] valuesArray()
public void forEach(Function3<? super java.lang.Long,? super java.lang.Long,? super java.lang.Long,Unit> body)
public void printContent(java.io.PrintStream out)
public Store getStore()
public long getTailRecid()
public long getHeadRecid()
public long getHeadPrevRecid()