Remove ALL an unlocked frames.  Throws IAE for all deletes that failed
(perhaps because the Frames were locked & in-use).
771991
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 deleteAll(int version, FramesV3 frames) {
    final Key[] keys = KeySnapshot.globalKeysOfClass(Frame.class);

    ArrayList<String> missing = new ArrayList<>();
    Futures fs = new Futures();
    for (Key key : keys) {
      try {
        getFromDKV("(none)", key).delete(null, fs);
      } catch (IllegalArgumentException iae) {
        missing.add(key.toString());
      }
    }
    fs.blockForPending();
    if( missing.size() != 0 ) throw new H2OKeysNotFoundArgumentException("(none)", missing.toArray(new String[missing.size()]));
    return frames;
  }
238931
public void removeAll(Transaction tran) throws MessageStoreException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeAll", tran);

    while(this.removeFirstMatching(null, tran) != null);

    remove(tran, NO_LOCK_ID);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeAll");
  }
534959
public void clear() {
		for (Object component : store.values()) {
			try {
				Event.of(Passivated.class).on(component).fire();
			} catch (Exception e) {}
		}
		
		for (Object component : store.values()) {
			try {
				Event.of(Destroyed.class).on(component).fire();
			} catch (Exception e) {}
		}
		
		store.clear();
	}
739054
public function clear()
    {
        if (!isset($this->frames)) {
            return $this;
        }

        $this->loadFrames();

        $this->frames = array();
        return $this;
    }
249547
public synchronized void clear(ApplicationDefinition appDef) {
        String appName = appDef.getAppName();
        for (TableDefinition tableDef : appDef.getTableDefinitions().values()) {
            m_cacheMap.remove(appName + "/" + tableDef.getTableName()); // might have no entry
        }
        m_appShardMap.remove(appName);
    }
1072424
private void removeAllEntries() {
        // A bit unusual, but we want to make sure we do not call this while the index is active.
        Preconditions.checkState(this.closed, "Cannot call removeAllEntries unless the ReadIndex is closed.");
        int count;
        synchronized (this.lock) {
            this.indexEntries.forEach(entry -> {
                if (entry.isDataEntry()) {
                    CacheKey key = getCacheKey(entry);
                    this.cache.remove(key);
                }
            });

            count = this.indexEntries.size();
            this.indexEntries.clear();
        }

        if (count > 0) {
            log.debug("{}: Cleared all cache entries ({}).", this.traceObjectId, count);
        }
    }
479439
def clear(self):
        
        for _, frame in self._segments.items():
            frame.configure(background=self._bg_color)
1304614
public static void cleanup ()
  {
    // Reinitialize singletons to the default values
    if (LocaleCache.isInstantiated ())
      LocaleCache.getInstance ().reinitialize ();
    if (CountryCache.isInstantiated ())
      CountryCache.getInstance ().reinitialize ();
    if (LanguageCache.isInstantiated ())
      LanguageCache.getInstance ().reinitialize ();
    if (SerializationConverterRegistry.isInstantiated ())
      SerializationConverterRegistry.getInstance ().reinitialize ();
    if (MimeTypeDeterminator.isInstantiated ())
      MimeTypeDeterminator.getInstance ().reinitialize ();
    if (ThirdPartyModuleRegistry.isInstantiated ())
      ThirdPartyModuleRegistry.getInstance ().reinitialize ();
    if (TypeConverterRegistry.isInstantiated ())
      TypeConverterRegistry.getInstance ().reinitialize ();
    if (URLProtocolRegistry.isInstantiated ())
      URLProtocolRegistry.getInstance ().reinitialize ();
    if (EqualsImplementationRegistry.isInstantiated ())
      EqualsImplementationRegistry.getInstance ().reinitialize ();
    if (HashCodeImplementationRegistry.isInstantiated ())
      HashCodeImplementationRegistry.getInstance ().reinitialize ();

    // Clear caches
    if (DefaultTextResolver.isInstantiated ())
      DefaultTextResolver.getInstance ().clearCache ();
    EnumHelper.clearCache ();
    ResourceBundleHelper.clearCache ();
    if (RegExCache.isInstantiated ())
      RegExCache.getInstance ().clearCache ();
    CollatorHelper.clearCache ();
    LocaleHelper.clearCache ();
    StatisticsManager.clearCache ();
    SystemProperties.clearWarnedPropertyNames ();
    if (ImageDataManager.isInstantiated ())
      ImageDataManager.getInstance ().clearCache ();

    // Clean this one last as it is used in equals and hashCode implementations!
    ClassHierarchyCache.clearCache ();
  }
1292594
@Override
  public void removeFailure(K key, StoreAccessException e) {
    try {
      loaderWriter.delete(key);
    } catch(Exception e1) {
      throw ExceptionFactory.newCacheWritingException(e1, e);
    } finally {
      cleanup(key, e);
    }
  }
418678
@Override
  public boolean removeFailure(K key, V value, StoreAccessException e) {
    cleanup(key, e);
    return false;
  }
983512
public void removeAll()
    {
        if (m_aCurrentRecord != null)
        {
            for (int index = m_iCurrentRecordStart; index < m_iCurrentRecordEnd; index++)
            {
                int iArrayIndex = this.bufferToArrayIndex(index);
                Object bookmark = m_aCurrentRecord[iArrayIndex];
                if ((bookmark != null) && (bookmark != gEmptyCell))
                    this.freeElement(bookmark);
                m_aCurrentRecord[iArrayIndex] = gEmptyCell;   // No record here
            }
        }
        m_iCurrentRecordStart = 0;      // The first
        m_iCurrentRecordEnd = 0;        // One after the last (Use array nomenclature)
    }
1243343
@Override
    public void deleteAll() throws LockingException {
        Connection conn = null;
        Statement stmnt = null;
        try {
            String sql = "DELETE FROM " + LOCK_TABLE;
            if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.deleteAll(): " + sql);

            conn = RDBMServices.getConnection();
            try {
                stmnt = conn.createStatement();
                int rc = stmnt.executeUpdate(sql);
                if (log.isDebugEnabled()) {
                    String msg = "Deleted " + rc + " locks.";
                    log.debug("RDBMEntityLockStore.deleteAll(): " + msg);
                }
            } finally {
                if (stmnt != null) stmnt.close();
            }
        } catch (SQLException sqle) {
            throw new LockingException("Problem deleting locks", sqle);
        } finally {
            RDBMServices.releaseConnection(conn);
        }
    }
517053
private void removeObsoleteElements(List<String> names,
                                        Map<String, View> sharedElements,
                                        List<String> elementsToRemove) {
        if (elementsToRemove.size() > 0) {
            names.removeAll(elementsToRemove);
            for (String elementToRemove : elementsToRemove) {
                sharedElements.remove(elementToRemove);
            }
        }
    }
583549
def cleanup(self):
        
        if self._movie is not None:
            self._movie.frameChanged.disconnect(self._updateFrame)
            self._movie = None
859055
@Override
    public void removeStorageEngine(StorageEngine<ByteArray, byte[], byte[]> engine) {
        String storeName = engine.getName();
        BdbStorageEngine bdbEngine = (BdbStorageEngine) engine;

        synchronized(lock) {

            // Only cleanup the environment if it is per store. We cannot
            // cleanup a shared 'Environment' object
            if(useOneEnvPerStore) {

                Environment environment = this.environments.get(storeName);
                if(environment == null) {
                    // Nothing to clean up.
                    return;
                }

                // Remove from the set of unreserved stores if needed.
                if(this.unreservedStores.remove(environment)) {
                    logger.info("Removed environment for store name: " + storeName
                                + " from unreserved stores");
                } else {
                    logger.info("No environment found in unreserved stores for store name: "
                                + storeName);
                }

                // Try to delete the BDB directory associated
                File bdbDir = environment.getHome();
                if(bdbDir.exists() && bdbDir.isDirectory()) {
                    String bdbDirPath = bdbDir.getPath();
                    try {
                        FileUtils.deleteDirectory(bdbDir);
                        logger.info("Successfully deleted BDB directory : " + bdbDirPath
                                    + " for store name: " + storeName);
                    } catch(IOException e) {
                        logger.error("Unable to delete BDB directory: " + bdbDirPath
                                     + " for store name: " + storeName);
                    }
                }

                // Remove the reference to BdbEnvironmentStats, which holds a
                // reference to the Environment
                BdbEnvironmentStats bdbEnvStats = bdbEngine.getBdbEnvironmentStats();
                this.aggBdbStats.unTrackEnvironment(bdbEnvStats);

                // Unregister the JMX bean for Environment
                if(voldemortConfig.isJmxEnabled()) {
                    ObjectName name = JmxUtils.createObjectName(JmxUtils.getPackageName(bdbEnvStats.getClass()),
                                                                storeName);
                    // Un-register the environment stats mbean
                    JmxUtils.unregisterMbean(name);
                }

                // Cleanup the environment
                environment.close();
                this.environments.remove(storeName);
                logger.info("Successfully closed the environment for store name : " + storeName);

            }
        }
    }
459237
public void cleanUp() {
    // Removing the entries from widgets.dat suffices. Opera will remove the other files.
    // These other files are:
    // widgets/xxx.oex
    // widgets/OEX_PATH_PREFIX/
    if (backupWidgetDat != null) {
      try {
        Files.move(backupWidgetDat, widgetsDat);
      } catch (IOException e) {
        throw new WebDriverException("Unable to restore widgets.dat");
      }
    } else {
      widgetsDat.delete();
    }
  }
801899
def clear(self, store=True):
        
        result = self._iface.ach_lock(self.name)
        result and store and self._store()
        return result