DatabaseEntry key = new DatabaseEntry();
QueueEntryKey dd = new QueueEntryKey(queueName, 0);
EntryBinding keyBinding = new QueueEntryTB();
keyBinding.objectToEntry(dd, key);
DatabaseEntry value = new DatabaseEntry();
LinkedList<Long> messageIds = new LinkedList<Long>();
OperationStatus status = cursor.getSearchKeyRange(key, value, LockMode.DEFAULT);
dd = (QueueEntryKey) keyBinding.entryToObject(key);
while ((status == OperationStatus.SUCCESS) && dd.getQueueName().equals(queueName))
{
messageIds.add(dd.getMessageId());
status = cursor.getNext(key, value, LockMode.DEFAULT);
if (status == OperationStatus.SUCCESS)
{
dd = (QueueEntryKey) keyBinding.entryToObject(key);
}
}
return messageIds;
}