protected long deleteMatchingFromQueue(final WorkQueueFrontier frontier, final String match) throws IOException { try { final BdbMultipleWorkQueues queues = ((BdbFrontier) frontier).getWorkQueues(); return queues.deleteMatchingFromQueue(match, classKey, new DatabaseEntry(origin)); } catch (DatabaseException e) { throw IoUtils.wrapAsIOException(e); } }