/* (non-Javadoc)
@see org.duracloud.mill.manifest.ManifestStore#purgeDeletedItemsBefore(java.util.Date)
971867
@Override
    @Transactional(value = MillJpaRepoConfig.TRANSACTION_MANAGER_BEAN, propagation = Propagation.REQUIRES_NEW)
    public int purgeDeletedItemsBefore(Date expiration) {
        return this.manifestItemRepo.deleteFirst50000ByDeletedTrueAndModifiedBefore(expiration);
    }
967690
public void deleteMtoNImplementor(CollectionDescriptor cod, Object obj)
    {
        ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass());
        ValueContainer[] pkValues = pb.serviceBrokerHelper().getKeyValues(cld, obj);
        String[] pkColumns = cod.getFksToThisClass();
        String table = cod.getIndirectionTable();
        String deleteStmt = pb.serviceSqlGenerator().getDeleteMNStatement(table, pkColumns, null);
        pb.serviceJdbcAccess().executeUpdateSQL(deleteStmt, cld, pkValues, null);
    }
653529
void purgeDataOlderThan(long minTxIdToKeep) throws IOException {
    if (isImageDir) {
      purgeMatching(sd.getCurrentDir(), IMAGE_CURRENT_DIR_PURGE_REGEXES,
          minTxIdToKeep);
    } else {
      purgeMatching(sd.getCurrentDir(), EDITS_CURRENT_DIR_PURGE_REGEXES,
          minTxIdToKeep);
      purgeMatching(getPaxosDir(), PAXOS_DIR_PURGE_REGEXES, minTxIdToKeep);
    }
  }
47021
public Date purgeObject(Context context,
                            String pid,
                            String logMessage) throws ServerException {
        throw rejectCallsFromOutsideWhileInRecoveryMode();
    }
496045
public static void setReminderClickDate(Context context, Date reminderClickDate) {
        final long reminderClickDateMills = ((reminderClickDate != null) ? reminderClickDate.getTime() : 0);

        SharedPreferences prefs = getSharedPreferences(context);
        SharedPreferences.Editor prefsEditor = prefs.edit();

        prefsEditor.putLong(PREF_KEY_REMINDER_CLICK_DATE, reminderClickDateMills);

        prefsEditor.commit();
    }
403108
public void deleteExpired(IEntityLock lock) throws LockingException {
        deleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey());
    }
187196
protected function purge(array $idArchivesToDelete, Date $dateStart, $reason)
    {
        $deletedRowCount = 0;
        if (!empty($idArchivesToDelete)) {
            $deletedRowCount = $this->deleteArchiveIds($dateStart, $idArchivesToDelete);

            $this->logger->info(
                "Deleted {count} rows in archive tables (numeric + blob) for {reason} for {date}.",
                array(
                    'count' => $deletedRowCount,
                    'date' => $dateStart,
                    'reason' => $reason
                )
            );

            $this->logger->debug("[Deleted IDs: {deletedIds}]", array(
                'deletedIds' => implode(',', $idArchivesToDelete)
            ));
        } else {
            $this->logger->debug(
                "No archives for {reason} found in archive numeric table for {date}.",
                array('date' => $dateStart, 'reason' => $reason)
            );
        }

        return $deletedRowCount;
    }
158062
public Date purgeObject(Context context,
                            String pid,
                            String logMessage) throws ServerException {
        try {
            CreatorJournalEntry cje =
                    new CreatorJournalEntry(METHOD_PURGE_OBJECT, context);
            cje.addArgument(ARGUMENT_NAME_PID, pid);
            cje.addArgument(ARGUMENT_NAME_LOG_MESSAGE, logMessage);
            return (Date) cje.invokeAndClose(delegate, writer);
        } catch (JournalException e) {
            throw new GeneralException("Problem creating the Journal", e);
        }
    }
1133052
@Override
	public void removeByLtS(Date sentDate) {
		for (CommerceNotificationQueueEntry commerceNotificationQueueEntry : findByLtS(
				sentDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceNotificationQueueEntry);
		}
	}
964408
public Date[] purgeDatastream(Context context,
                                  String pid,
                                  String datastreamID,
                                  Date startDT,
                                  Date endDT,
                                  String logMessage) throws ServerException {
        return worker.purgeDatastream(context,
                                      pid,
                                      datastreamID,
                                      startDT,
                                      endDT,
                                      logMessage);
    }
32913
public PoolDeleteOptions withOcpDate(DateTime ocpDate) {
        if (ocpDate == null) {
            this.ocpDate = null;
        } else {
            this.ocpDate = new DateTimeRfc1123(ocpDate);
        }
        return this;
    }
638543
public void deleteCalendar(GoogleCalendar calendar) throws IOException {
        dao.calendars().delete(calendar.getId()).execute();
    }
674555
@Override
	public void purge(long tillWhen){
		Long t;
		while((t = ((NavigableMap<Long, AtomicLong>)counters.getMap()).firstKey()) != null && t < tillWhen){
			counters.remove(t);
		}
	}
1116707
public void onDeleteResponseEvent(ResponseEvent event,
			ActivityContextInterface aci) {
		if (event.getException() != null) {
			if (tracer.isInfoEnabled()) {
				tracer.info("Failed to delete " + event.getURI(),
						event.getException());
			}

			getParent().deleteResponse(event.getURI(), 500, null, null);
		} else {
			final XcapResponse response = event.getResponse();
			if (tracer.isInfoEnabled()) {
				if (response.getCode() == 200) {
					tracer.info("Deleted " + event.getURI() + ". ETag:"
							+ response.getETag());
				} else {
					tracer.info("Failed to delete " + event.getURI()
							+ ". Response: " + response);
				}
			}
			getParent().deleteResponse(event.getURI(), response.getCode(),
					response.getEntity().getContentAsString(),
					response.getETag());
		}
	}
1185249
@Override
    public boolean removeCalendar(String calendarName, JedisCluster jedis) throws JobPersistenceException {
        final String calendarTriggersSetKey = redisSchema.calendarTriggersSetKey(calendarName);

        if (jedis.scard(calendarTriggersSetKey) > 0) {
            throw new JobPersistenceException(String.format("There are triggers pointing to calendar %s, so it cannot be removed.", calendarName));
        }
        final String calendarHashKey = redisSchema.calendarHashKey(calendarName);
        Long deleteResponse = jedis.del(calendarHashKey);
        jedis.srem(redisSchema.calendarsSet(), calendarHashKey);

        return deleteResponse == 1;
    }
202083
@Override
    public String delete(EntityDeleteOperation deleter) throws ServiceException {
        try {
            return service.delete(deleter);
        } catch (UniformInterfaceException e) {
            throw processCatch(new ServiceException(e));
        } catch (ClientHandlerException e) {
            throw processCatch(new ServiceException(e));
        }
    }
1067397
@Override
    public List<String> purgeDatastream(String pid,
                                        String dsID,
                                        String startDT,
                                        String endDT,
                                        String logMessage,
                                        boolean force) {
        LOG.debug("start: purgeDatastream, {}, {}", pid, dsID);
        assertInitialized();
        try {
            MessageContext ctx = context.getMessageContext();
            return toStringList(m_management.purgeDatastream(ReadOnlyContext
                    .getSoapContext(ctx), pid, dsID, DateUtility
                    .parseDateOrNull(startDT), DateUtility
                    .parseDateOrNull(endDT), logMessage));
        } catch (Throwable th) {
            LOG.error("Error purging datastream", th);
            throw CXFUtility.getFault(th);
        } finally {
            LOG.debug("end: purgeDatastream, {}, {}", pid, dsID);
        }
    }