public class RocksDbQueue extends Object implements AutoCloseable
| Constructor and Description |
|---|
RocksDbQueue(Path path)
Instantiates the class and the queue data directory
|
| Modifier and Type | Method and Description |
|---|---|
void |
ack(List<Attribute> attributes)
Remove attributes from the queue.
|
void |
close()
Close the
RocksDbQueue instance. |
void |
insert(Attribute attribute)
insert a new attribute at the end of the queue.
|
List<Attribute> |
read(int limit)
Read at most N attributes from the beginning of the queue.
|
public RocksDbQueue(Path path)
path - where to persist the queue datapublic void insert(Attribute attribute)
attribute - the attribute to be insertedpublic List<Attribute> read(int limit) throws InterruptedException
#ack(List) on the returned attributes.limit - the maximum number of items to be returned.AttributeInterruptedException#ack(List) public void ack(List<Attribute> attributes)
attributes - the attributes which will be removedpublic void close()
RocksDbQueue instance.close in interface AutoCloseableCopyright © 2018 Grakn Labs Ltd. All rights reserved.