@Override public void performActions() throws PortalException { try { long previousPrimaryKey = -1; while (true) { long lastPrimaryKey = doPerformActions(previousPrimaryKey); if (lastPrimaryKey < 0) { return; } intervalCompleted(previousPrimaryKey, lastPrimaryKey); previousPrimaryKey = lastPrimaryKey; } } finally { _offset = 0; actionsCompleted(); } }