import com.cxy.redisclient.integration.set.RemoveSet;
import com.cxy.redisclient.integration.set.RemoveSetFactory;
public class SetService {
public long add(int id, int db, String key, Set<String> values, int ttl) {
AddSet command = (AddSet) new AddSetFactory(id, db, key, values).getCommand();
command.execute();
if(ttl != -1){
Expire command1 = new Expire(id, db, key, ttl);
command1.execute();
}
return command.getSize();
}