@ThreadSafe public class PersistedQueue extends Object
| Constructor and Description |
|---|
PersistedQueue(File queueEnvPath,
String queueName,
int cacheSize)
Creates instance of persistent queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this queue and frees up all resources associated to it.
|
String |
getQueueName()
Returns this queue name.
|
String[] |
poll()
Retrieves and returns element from the head of this queue.
|
void |
push(String dn,
String element)
Pushes element to the queue.
|
long |
size()
Returns the size of this queue.
|
public String[] poll() throws IOException
IOException - in case of disk IO failurepublic void push(String dn, String element) throws IOException
dn - The entry DNelement - elementIOException - in case of disk IO failurepublic long size()
public String getQueueName()
public void close()
Copyright © 2017-2020 Wren Security. All Rights Reserved.