Example usage for org.springframework.data.redis.core SetOperations remove

List of usage examples for org.springframework.data.redis.core SetOperations remove

Introduction

In this page you can find the example usage for org.springframework.data.redis.core SetOperations remove.

Prototype

@Nullable
Long remove(K key, Object... values);

Source Link

Document

Remove given values from set at key and return the number of removed elements.

Usage

From source file:com.easarrive.datasource.redis.etago.AbstractDaoByRedisTemplate.java

public Long setDelete(K key, V... beans) {
    SetOperations<K, V> setOperations = redisTemplate.opsForSet();
    Long count = setOperations.remove(key, beans);
    return count;
}

From source file:com.company.project.service.dao.RedisDao.java

/**
 * Remove value/s from set//w  w w  . j av  a2 s .c  om
 * @param key
 * @param values
 * @return 
 */
public long removeUsingOpsForSet(String key, Object... values) {
    SetOperations opsForSet = redisTemplate.opsForSet();
    return opsForSet.remove(key, values);
}