region > purgeProcessed
177945
@Programmatic
    public void purgeProcessed() {
        // REVIEW: this is not particularly performant.
        // much better would be to go direct to the JDO API.
        List<PublishedEvent> processedEvents = findProcessed();
        for (PublishedEvent publishedEvent : processedEvents) {
            publishedEvent.delete();
        }
    }
174335
public void purgeCounters(final long epochMinute)
    {
    	for (Iterator<Map.Entry<String, MinuteCounter>> it = errorCounter.entrySet().iterator(); it.hasNext(); ) {
    		Map.Entry<String, MinuteCounter> entry = it.next();
    		
    		if (entry.getValue().getEpochMinute() < epochMinute) {
    			it.remove();
    		}
    	}
    }
73111
def purge(self):
    
    purged_count = 0
    if self.__expiration is not None:
      with self.__connection:
        if self.__caching_strategy is CachingStrategy.FIFO:
          # dump least recently added rows
          for post in (False, True):
            purged_count += self.__connection.execute("DELETE FROM " +
                                                      self.getDbTableName(post=post) + " "
                                                      "WHERE (strftime('%s', 'now') - added_timestamp) > ?;",
                                                      (self.__expiration,)).rowcount
        elif self.__caching_strategy is CachingStrategy.LRU:
          # dump least recently accessed rows
          for post in (False, True):
            purged_count += self.__connection.execute("DELETE FROM " +
                                                      self.getDbTableName(post=post) + " "
                                                      "WHERE (strftime('%s', 'now') - last_accessed_timestamp) > ?;",
                                                      (self.__expiration,)).rowcount
    return purged_count
39874
def purge(self):
        '''
        
        '''
        for table_name in self._db.list_tables():
            self._db.flush(table_name)

        self._run_init_queries()
387076
def purge(*paths)
      paths.all? do |path|
        ActiveSupport::Notifications.instrument('purge.lacquer', path: path) do |payload|
          send_command(Lacquer.configuration.purge_command + " " + path.gsub('\\', '\\\\\\')).all? do |result|
            payload[:result] = result
            result =~ /200/
          end
        end
      end
    end
553819
def purge():
    
    all_hashes = read_all()
    used_hashes = read_used()
    for kind, hashes in used_hashes.items():
        hashes = set(hashes)
        to_remove = set(all_hashes[kind]).difference(hashes)
        delete_from_directory_by_hashes(kind, to_remove)

    reset_used()
    write_out()
674555
@Override
	public void purge(long tillWhen){
		Long t;
		while((t = ((NavigableMap<Long, AtomicLong>)counters.getMap()).firstKey()) != null && t < tillWhen){
			counters.remove(t);
		}
	}
653351
@Trivial
    private final void purgeFutures() {
        for (Iterator<Future<Void>> it = futures.iterator(); it.hasNext();)
            if (it.next().isDone())
                it.remove();
    }
713806
public void purge() throws VictimsException {
        try {
            File cache = new File(location);
            if (cache.exists()) {
                FileUtils.deleteDirectory(cache);
            }
            create(cache);
        } catch (IOException e) {
            throw new VictimsException("Could not purge on disk cache.", e);
        }
    }
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)
1215437
public Date purgeObject(Context context,
                            String pid,
                            String logMessage) throws ServerException {
        return worker.purgeObject(context, pid, logMessage);
    }
1147351
def purge
      output.each do |file, format|
        if File.exist?(file)
          rm(file)
          report "Removed #{file}"
        end
      end
    end
300521
public void run() {
    long purged_columns;
    try {
      purged_columns = purgeUIDMeta().joinUninterruptibly();
      LOG.info("Thread [" + thread_id + "] finished. Purged [" + 
          purged_columns + "] UIDMeta columns from storage");
      
      purged_columns = purgeTSMeta().joinUninterruptibly();
      LOG.info("Thread [" + thread_id + "] finished. Purged [" + 
          purged_columns + "] TSMeta columns from storage");
    } catch (Exception e) {
      LOG.error("Unexpected exception", e);
    }
    
  }
973402
public void purge(Date baseTime, long periodBefore, TimeUnit unit) {
		purge(baseTime.getTime(), periodBefore, unit);
	}
963189
def purge(cls, domain, login, background=False):
        """"""
        oper = cls.call('domain.mailbox.purge', domain, login)
        if background:
            return oper
        else:
            cls.echo('Purging in progress')
            cls.display_progress(oper)
573477
def cleanup(self):
        
        now = time.time()
        expired = now - NODE_TIMEOUT
        if self.conn.zremrangebyscore(self.key, 0, expired):
            self._notify()
676802
def purge(self, connection):
        """"""
        self._checkpid()
        if connection.pid == self.pid:
            idx = connection._pattern_idx
            if connection in self._in_use_connections[idx]:
                self._in_use_connections[idx].remove(connection)
            else:
                self._available_connections[idx].remove(connection)
            connection.disconnect()