Returns a mutation that will delete all rows with primary keys covered by {@code keySet}.
337461
public static Mutation delete(String table, KeySet keySet) {
    return new Mutation(table, Op.DELETE, null, null, checkNotNull(keySet));
  }
856556
public static KeySet all() {
    return new KeySet(true, ImmutableList.<Key>of(), ImmutableList.<KeyRange>of());
  }
1152217
public BatchMutation<K> addDeletion(K key, List<String> columnFamilies, Deletion deletion) {
    Mutation mutation = new Mutation();
    mutation.setDeletion(deletion);
    addMutation(key, columnFamilies, mutation);
    return this;
  }
34051
public TableWriteItems addPrimaryKeyToDelete(PrimaryKey primaryKey) {
        if (primaryKey != null) {
            if (primaryKeysToDelete == null)
                primaryKeysToDelete = new ArrayList<PrimaryKey>();
            checkConsistency(primaryKey);
            this.primaryKeysToDelete.add(primaryKey);
        }
        return this;
    }
238830
public void deleteRow(Mutator<K> mutator, K key) {    
    mutator.addDeletion(key, columnFamily, null, topSerializer);
    executeIfNotBatched(mutator);
  }
601103
public Boolean deletes(String tableName, Set<byte[]> rowKeys) {
        boolean flag = false;
        try {
            HTable table = (HTable) getConnection().getTable(TableName.valueOf(tableName));
            List<Delete> deletes = new ArrayList<>();
            for (byte[] rowKey : rowKeys) {
                Delete delete = new Delete(rowKey);
                deletes.add(delete);
            }
            if (!deletes.isEmpty()) {
                table.delete(deletes);
            }
            flag = true;
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new RuntimeException(e);
        }
        return flag;
    }
768297
public Long del(String... keys) {
		try (Jedis jedis = getJedis()) {
			return jedis.del(keys);
		}
	}
1121815
@SuppressWarnings("deprecation") // The String ctor is deprecated, but fast.
  public Set<String> keys() {
    if (isEmpty()) {
      return Collections.emptySet();
    }
    Set<String> ks = new HashSet<>(size);
    for (int i = 0; i < size; i++) {
      ks.add(new String(name(i), 0 /* hibyte */));
    }
    // immutable in case we decide to change the implementation later.
    return Collections.unmodifiableSet(ks);
  }
905274
@Override
    public Set<String> keySet() {
        Set<String> keys = new HashSet<>();
        keysR(root.getLeft(), -1, keys);
        return keys;
    }
1028927
public void delete(final Collection<K> keys) throws SQLException {
        transactionTemplate
            .doInTransaction(new SQLFunction<Connection, Object>() {
                @Override
                public Object apply(Connection connection) throws SQLException {
                    delegate.delete(connection, keys);
                    return null;
                }
            });
    }
515674
@Override
    public void release() throws Exception {
        if (!locksToDelete.isEmpty() || lockColumn != null) {
            MutationBatch m = keyspace.prepareMutationBatch().setConsistencyLevel(consistencyLevel);
            fillReleaseMutation(m, false);
            m.execute();
        }
    }
228915
public boolean remove(KType key) {
    if (Intrinsics.isEmpty(key)) {
      boolean hadEmptyKey = hasEmptyKey;
      hasEmptyKey = false;
      return hadEmptyKey;
    } else {
      final KType [] keys = Intrinsics.<KType[]> cast(this.keys);
      final int mask = this.mask;
      int slot = hashKey(key) & mask;
      
      KType existing;
      while (!Intrinsics.isEmpty(existing = keys[slot])) {
        if (Intrinsics.equals(this, key, existing)) {
          shiftConflictingKeys(slot);
          return true;
        }
        slot = (slot + 1) & mask;
      }
      return false;
    }
  }
700175
public final Set<K> keySet() {
	return new AbstractSet<K>() {
	    public Iterator<K> iterator() {
		final Iterator<Map.Entry<K,V>> ite = entryIterator();
		return new Iterator<K>() {
		    public boolean hasNext() { return ite.hasNext(); }
		    public void    remove()  { ite.remove(); }
		    public K       next()    { return ite.next().getKey(); }
		};
	    }
	    public int size() {
		return size;
	    }
	};
    }
707240
@Override
  public void deleteRow(K key) {
    createMutator().delete(key, getColumnFamily(), null, null);
  }
729880
private @Nullable CacheWriterException deleteAllToCacheWriter(Set<? extends K> keys) {
    if (!configuration.isWriteThrough() || keys.isEmpty()) {
      return null;
    }
    List<K> keysToDelete = new ArrayList<>(keys);
    try {
      writer.deleteAll(keysToDelete);
      return null;
    } catch (CacheWriterException e) {
      keys.removeAll(keysToDelete);
      throw e;
    } catch (RuntimeException e) {
      keys.removeAll(keysToDelete);
      return new CacheWriterException("Exception in CacheWriter", e);
    }
  }
80918
@NonNull
  public static DeleteSelection deleteFrom(
      @Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier table) {
    return new DefaultDelete(keyspace, table);
  }
194874
private static MethodSpec buildDeleteByKeys(EntityMetaSignature signature) {
        ParameterizedTypeName returnType = genericType(DELETE_WITH_OPTIONS, signature.entityRawClass);
        final MethodSpec.Builder builder = MethodSpec.methodBuilder("deleteById")
                .addJavadoc("Delete an entity using its complete primary key")
                .addModifiers(Modifier.PUBLIC)
                .addStatement("$T keys = new $T<>()", LIST_OBJECT, ARRAY_LIST)
                .addStatement("$T encodedKeys = new $T<>()", LIST_OBJECT, ARRAY_LIST);

        signature.fieldMetaSignatures
                .stream()
                .filter(x -> x.context.columnType == PARTITION)
                .map(x -> Tuple3.of(x.context.fieldName, x.sourceType, (PartitionKeyInfo) x.context.columnInfo))
                .sorted(PARTITION_KEY_SORTER)
                .forEach(tuple ->
                        builder.addJavadoc("@param $L partition key '$L'", tuple._1(), tuple._1())
                                .addParameter(tuple._2(), tuple._1(), Modifier.FINAL)
                                .addStatement("$T.validateNotNull($L, $S, $S)", VALIDATOR, tuple._1(),
                                        "Partition key '%s' should not be null", tuple._1())
                                .addStatement("keys.add($L)", tuple._1())
                                .addStatement("encodedKeys.add($L.$L.encodeFromJava($N, cassandraOptions))",
                                        signature.className + META_SUFFIX, tuple._1(), tuple._1())
                );

        signature.fieldMetaSignatures
                .stream()
                .filter(x -> x.context.columnType == CLUSTERING)
                .map(x -> Tuple3.of(x.context.fieldName, x.sourceType, (ClusteringColumnInfo) x.context.columnInfo))
                .sorted(CLUSTERING_COLUMN_SORTER)
                .forEach(tuple ->
                        builder.addJavadoc("@param $L clustering column '$L'", tuple._1(), tuple._1())
                                .addParameter(tuple._2(), tuple._1(), Modifier.FINAL)
                                .addStatement("$T.validateNotNull($L, $S, $S)", VALIDATOR, tuple._1(),
                                        "Partition key '%s' should not be null", tuple._1())
                                .addStatement("keys.add($L)", tuple._1())
                                .addStatement("encodedKeys.add($L.$L.encodeFromJava($N, cassandraOptions))",
                                        signature.className + META_SUFFIX, tuple._1(), tuple._1()));

        builder.addJavadoc("@return DeleteWithOptions<$T>", signature.entityRawClass);

        builder.addStatement("final Object[] partitionKeysValues = keys.toArray()")
                .addStatement("final Object[] encodedPartitionKeyValues = encodedKeys.toArray()")
                .addStatement("return new $T(entityClass, meta, rte, partitionKeysValues, encodedPartitionKeyValues, $T.empty(), cassandraOptions)", returnType, OPTIONAL)
                .returns(returnType);


        return builder.build();
    }