当前位置: 首页>>代码示例>>Java>>正文


Java Jedis.srem方法代码示例

本文整理汇总了Java中redis.clients.jedis.Jedis.srem方法的典型用法代码示例。如果您正苦于以下问题:Java Jedis.srem方法的具体用法?Java Jedis.srem怎么用?Java Jedis.srem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在redis.clients.jedis.Jedis的用法示例。


在下文中一共展示了Jedis.srem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sremString

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
public long sremString(String key, String value) {
	Jedis jedis = null;
	boolean success = true;
	long ret = 0L;
	try {
		jedis = jedisPool.getResource();
		if (jedis == null) {
			success = false;
			return ret;
		}
		ret = jedis.srem(key, value);
	} catch (Exception e) {
		success = false;
		returnBrokenResource(jedis, "sremString" + key, e);
	} finally {
		releaseReidsSource(success, jedis);
	}
	return ret;
}
 
开发者ID:qq1588518,项目名称:JRediClients,代码行数:20,代码来源:RedisService.java

示例2: sremStrings

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
public long sremStrings(String key, String... values) {
	Jedis jedis = null;
	boolean success = true;
	long ret = 0L;
	try {
		jedis = jedisPool.getResource();
		if (jedis == null) {
			success = false;
			return ret;
		}
		ret = jedis.srem(key, values);
	} catch (Exception e) {
		success = false;
		returnBrokenResource(jedis, "sremStrings" + key, e);
	} finally {
		releaseReidsSource(success, jedis);
	}
	return ret;
}
 
开发者ID:qq1588518,项目名称:JRediClients,代码行数:20,代码来源:RedisService.java

示例3: delSetByKey

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
/**
 * 删除Set
 * @param dkey
 * @return
 */
public Long delSetByKey(String key,String...dkey) throws Exception {
	Jedis jds = null;
	try {
		jds = getJedis();
		jds.select(0);
		Long result = 0L;
		if(null == dkey){
			result = jds.srem(key);
		}else{
			result = jds.del(key);
		}
		return result;
	} catch (Exception e) {
		throw e;
	} finally {
		if(jds != null)
		{
			jds.close();
		}
	}
}
 
开发者ID:wjggwm,项目名称:webside,代码行数:27,代码来源:RedisManager.java

示例4: resetRequestRepeatCheck

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
@Override
public void resetRequestRepeatCheck(Task task, Request request) {
    Jedis jedis = jedisPool.getResource();
    try {
        jedis.srem(RedisKeys.getSetKey(task), request.key());
    } finally {
        jedis.close();
    }
}
 
开发者ID:brucezee,项目名称:jspider,代码行数:10,代码来源:RedisScheduler.java

示例5: srem

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
@Override
public Long srem(String key, String... members) {
    Jedis jedis = null;
    Long res = null;
    try {
        jedis = pool.getResource();
        res = jedis.srem(key, members);
    } catch (Exception e) {

        LOGGER.error(e.getMessage());
    } finally {
        returnResource(pool, jedis);
    }
    return res;
}
 
开发者ID:wxiaoqi,项目名称:ace-cache,代码行数:16,代码来源:RedisServiceImpl.java

示例6: onJoin

import redis.clients.jedis.Jedis; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.LOWEST)
public void onJoin(PlayerJoinEvent event)
{
    final Player player = event.getPlayer();

    if (forceUrl != null)
    {
        currentlyDownloading.add(player.getUniqueId());
        sendPack(player, forceUrl);

        //Kick if still downloading after 1 minute
        Bukkit.getScheduler().runTaskLater(SamaGamesAPI.get().getPlugin(),
                () -> {
                    if(currentlyDownloading.contains(player.getUniqueId()) && player.isOnline())
                    {
                        if (callback == null || callback.automaticKick(player))
                        {
                            player.kickPlayer(rejectMessage);
                        }
                        currentlyDownloading.remove(player.getUniqueId());
                        APIPlugin.getInstance().getLogger().info("Player " + player.getName() + " timed out resource pack");
                    }
                }, 1200L);//20*60
    } else
    {
        Jedis jedis = api.getBungeeResource();
        Long l = jedis.srem("playersWithPack", player.getUniqueId().toString());
        jedis.close();

        if (l > 0)
        {
            //Better to check than force resourcepack
            player.setResourcePack(resetUrl);
            APIPlugin.getInstance().getLogger().info("Sending pack to " + player.getName() + " : " + resetUrl);
        }
    }
}
 
开发者ID:SamaGames,项目名称:SamaGamesCore,代码行数:38,代码来源:ResourcePacksManagerImpl.java


注:本文中的redis.clients.jedis.Jedis.srem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。