| 123456789101112131415161718192021222324252627282930313233 |
- package com.td.boss.util;
- import org.apache.tomcat.util.codec.binary.Base64;
- import org.bouncycastle.jce.provider.BouncyCastleProvider;
- import javax.crypto.Cipher;
- import javax.crypto.spec.SecretKeySpec;
- import java.nio.charset.StandardCharsets;
- import java.security.SecureRandom;
- import java.util.Random;
- /**
- * redis 参数
- */
- public class RedisData {
- /**
- * 1s SNB锁
- */
- private static final int SNB_TIMEOUT = 5 * 1000; //5s锁
- public static int getSnbTimeout() {
- return SNB_TIMEOUT;
- }
- /**
- * 10s 背包锁
- */
- private static final int PLAYER_GOODS_TIMEOUT = 10 * 1000; //超时时间 10s
- public static int getPlayerGoodsTimeout() {
- return PLAYER_GOODS_TIMEOUT;
- }
- }
|