程序包 com.sh.util

类 CacheUtil

java.lang.Object
com.sh.util.CacheUtil

public class CacheUtil extends Object

Description: 缓存工具类

Title:首亨软件 - TSS/CRM等

从以下版本开始:
2017年8月9日
  • 构造器详细资料

    • CacheUtil

      public CacheUtil()
  • 方法详细资料

    • refreshCacheByTableName

      public static void refreshCacheByTableName(String tableName)
      按表更新缓存
      参数:
      tableName - String
    • refreshCacheByTableName

      public static void refreshCacheByTableName(String dcType, String tableName)
      按表更新缓存
      参数:
      dcType - String
      tableName - String
    • setCacheValue

      public static void setCacheValue(String key, String value)
    • setCacheValue

      public static void setCacheValue(String key, int value)
    • setCacheValue

      public static void setCacheValue(String key, String value, long seconds)
    • setCacheValue

      public static void setCacheValue(String key, String value, int seconds)
      设置缓存
      参数:
      key - String
      value - String
      seconds - int
    • setCacheValue

      public static void setCacheValue(String key, int value, int seconds)
    • getCacheStringValueAndRemove

      public static String getCacheStringValueAndRemove(String key)
    • getCacheStringValue

      public static String getCacheStringValue(String key)
    • getCacheIntValueAndRemove

      public static int getCacheIntValueAndRemove(String key, int defaultValue)
    • getCacheIntValue

      public static int getCacheIntValue(String key, int defaultValue)
    • getCacheStringValue

      public static String getCacheStringValue(String key, boolean toRemove)
    • getCacheIntValue

      public static int getCacheIntValue(String key, int defaultValue, boolean toRemove)
    • getCacheIncrementLongValue

      public static long getCacheIncrementLongValue(String key, long defaultValue)
    • removeCacheValue

      public static void removeCacheValue(String... key)