Interface DistributedCacheClient<T>

Type Parameters:
T -
All Known Implementing Classes:
AbstractDistributedCacheClient, JRedis, SpyMemcached

public interface DistributedCacheClient<T>
Since:
0.8
Author:
Haiyang Li
  • Field Details

  • Method Details

    • serverUrl

      String serverUrl()
      Returns:
    • get

      T get(String key)
      Parameters:
      key -
      Returns:
    • getBulk

      Map<String,T> getBulk(String... keys)
      Gets the bulk.
      Parameters:
      keys -
      Returns:
    • getBulk

      Map<String,T> getBulk(Collection<String> keys)
      Gets the bulk.
      Parameters:
      keys -
      Returns:
    • set

      boolean set(String key, T obj, long liveTime)
      Parameters:
      key -
      obj -
      liveTime -
      Returns:
      true, if successful
    • delete

      boolean delete(String key)
      Parameters:
      key -
      Returns:
      true, if successful
    • incr

      long incr(String key)
      Parameters:
      key -
      Returns:
    • incr

      long incr(String key, int deta)
      Parameters:
      key -
      deta -
      Returns:
    • decr

      long decr(String key)
      Parameters:
      key -
      Returns:
    • decr

      long decr(String key, int deta)
      Parameters:
      key -
      deta -
      Returns:
    • flushAll

      void flushAll()
      Delete all the keys from all the servers.
    • disconnect

      void disconnect()
      Disconnect.