in src/main/java/org/apache/sling/distribution/journal/queue/impl/PubQueue.java [143:163]
public DistributionQueueEntry remove(String entryId) {
/*
* When the UI is adapted to allow clearing a
* range of items from the head, this method
* should throw an UnsupportedOperationException
* and the REMOVABLE capability must be removed.
*
* Until then, the REMOVABLE capability is provided
* but only allows to remove the head of the queue.
*/
log.info("Removing queue entry {}", entryId);
DistributionQueueEntry headEntry = getHead();
if (headEntry != null) {
if (headEntry.getId().equals(entryId)) {
clear(headEntry);
} else {
throw new UnsupportedOperationException("Unsupported random clear operation");
}
}
return headEntry;
}