當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。