Clear all the snapshots for a given keyspace.

@param snapshotName the user supplied snapshot name. It empty or null,
all the snapshots will be cleaned
764997
public static void clearSnapshot(String snapshotName, String keyspace)
    {
        List<File> snapshotDirs = Directories.getKSChildDirectories(keyspace);
        Directories.clearSnapshot(snapshotName, snapshotDirs);
    }
123788
public static void clearEvidence(Network bn, String nodeName)
            throws ShanksException {
        int node = bn.getNode(nodeName);
        if (bn.isEvidence(node)) {
            bn.clearEvidence(nodeName);
            bn.updateBeliefs();
        }
    }
1274451
public void clear()
  {
    for (int i = 0; i < _values.length; i++) {
      _keys[i] = null;
      _values[i] = 0;
    }
    
    _size = 0;
  }
827033
public void delete(String bucketName, List<KeyVersion> objects) {
        ReactiveSeq.fromList(objects)
                   .grouped(1000)
                   .forEach(l -> {
                       DeleteObjectsRequest req = new DeleteObjectsRequest(
                                                                           bucketName);
                       req.setKeys(l.toList());
                       client.deleteObjects(req);
                   });
    }
290745
public void clear()
  {
    _nullValue = NULL;
    
    for (int i = 0; i < _values.length; i++) {
      _keys[i] = null;
      _flags[i] = 0;
      _values[i] = 0;
    }
    
    _size = 0;
  }
651510
final boolean clear(String hostname) {
        Entries entries = resolveCache.remove(hostname);
        return entries != null && entries.clearAndCancel();
    }
748920
def delete_snapshot(self, snapshot_id):
        """"""
        query = self.query_factory(
            action="DeleteSnapshot", creds=self.creds, endpoint=self.endpoint,
            other_params={"SnapshotId": snapshot_id})
        d = query.submit()
        return d.addCallback(self.parser.truth_return)
299848
public void clear() {
        documentsByEntity.clear();
        deletedEntities.clear();
        documentsById.clear();
        _knownMissingIds.clear();
        if (_countersByDocId != null) {
            _countersByDocId.clear();
        }
    }
211673
public void remove(final String propertyName) {
        Preconditions.checkNotNull(propertyName);
        if (properties.containsKey(propertyName)) {
            properties.remove(propertyName);
        } else if (references.containsKey(propertyName)) {
            references.remove(propertyName);
        }
    }
1364018
private synchronized void clear() {

        if (!isEnabled()) {
            return;
        }
        m_keyCache.clear();
        m_size = 0;

        m_variationCache.clear();

        if (LOG.isInfoEnabled()) {
            LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_0));
        }
    }
60642
public void clear (final Name username)
    {
        // if we're holding this username for a session observer, postpone until after the current
        // dispatch finishes
        if (_holds.contains(username)) {
            _holds.remove(username);
            _omgr.postRunnable(new Runnable () {
                public void run () {
                    clear(username);
                }
            });
            return;
        }

        // Log.info("Clearing history for " + username + ".");
        _histories.remove(username);
    }
146301
public void clear()
    {
        final Object[] keys = _keys;
        final int[] values = _values;

        for (int i = keys.length - 1; i >= 0; i--) {
            keys[i] = null;
            values[i] = 0;
        }

        _size = 0;
    }
961616
function removeSnapshot(name) {
		localStorage.removeItem(SNAPSHOT_PREFIX + name);
		snapshotsList = snapshotsList.filter(function(e) {
			return e.name !== name;
		});
		delete snapshots[name];
		data.snapshots = snapshotsList;
	}
862972
private void deleteExtraSnapshots() {
        if (m_snapshots.size() <= m_retain) {
            setState(State.WAITING);
        } else {
            m_lastSysprocInvocation = System.currentTimeMillis();
            setState(State.DELETING);
            final int numberToDelete = m_snapshots.size() - m_retain;
            String pathsToDelete[] = new String[numberToDelete];
            String noncesToDelete[] = new String[numberToDelete];
            for (int ii = 0; ii < numberToDelete; ii++) {
                final Snapshot s = m_snapshots.poll();
                pathsToDelete[ii] = s.path;
                noncesToDelete[ii] = s.nonce;
                SNAP_LOG.info("Snapshot daemon deleting " + s.nonce);
            }
            Object params[] =
                new Object[] {
                    pathsToDelete,
                    noncesToDelete,
                    SnapshotPathType.SNAP_AUTO.toString()
                    };
            long handle = m_nextCallbackHandle++;
            m_procedureCallbacks.put(handle, new ProcedureCallback() {

                @Override
                public void clientCallback(final ClientResponse clientResponse)
                        throws Exception {
                    processClientResponsePrivate(clientResponse);
                }

            });
            m_initiator.initiateSnapshotDaemonWork("@SnapshotDelete", handle, params);
        }
    }
1074507
@Override
  public CompletableFuture<Void> restoreSnapshot(String snapshotName, boolean takeFailSafeSnapshot) {
    CompletableFuture<Void> future = new CompletableFuture<>();
    listSnapshots(Pattern.compile(snapshotName)).whenComplete(
      (snapshotDescriptions, err) -> {
        if (err != null) {
          future.completeExceptionally(err);
          return;
        }
        final TableName tableName = snapshotExists(snapshotName,snapshotDescriptions);
        if (tableName == null) {
          future.completeExceptionally(new RestoreSnapshotException(
              "Unable to find the table name for snapshot=" + snapshotName));
          return;
        }
        tableExists(tableName)
            .whenComplete((exists, err2) -> {
              if (err2 != null) {
                future.completeExceptionally(err2);
              } else if (!exists) {
                // if table does not exist, then just clone snapshot into new table.
                completeConditionalOnFuture(future,cloneSnapshot(snapshotName, tableName));
              } else {
               isTableDisabled(tableName).whenComplete((disabled, err4) -> {
                  if (err4 != null) {
                    future.completeExceptionally(err4);
                  } else if (!disabled) {
                    future.completeExceptionally(new TableNotDisabledException(tableName));
                  } else {
                    completeConditionalOnFuture(future,
                      restoreSnapshot(snapshotName,takeFailSafeSnapshot));
                  }
                });
            }
          });
        });
    return future;
  }
893895
public com.google.protobuf.ByteString
      getSnapshotNameBytes() {
    java.lang.Object ref = snapshotName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      snapshotName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
587689
@Override
    public void unset(String propName) {
        if (propName.equals("level")) {
            unsetLevel();
        }
        if (propName.equals("treeView")) {
            unsetTreeView();
        }
        super.unset(propName);
    }