Package play.cache

Class MemcachedImpl

  • All Implemented Interfaces:
    CacheImpl

    public class MemcachedImpl
    extends java.lang.Object
    implements CacheImpl
    Memcached implementation (using http://code.google.com/p/spymemcached/)

    expiration is specified in seconds

    • Constructor Summary

      Constructors 
      Constructor Description
      MemcachedImpl​(java.util.Properties configuration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void delete​(java.lang.String key)  
      java.lang.Object get​(java.lang.String key)  
      net.spy.memcached.MemcachedClient getClient()  
      void set​(java.lang.String key, java.lang.Object value, int expiration)  
      void stop()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemcachedImpl

        public MemcachedImpl​(java.util.Properties configuration)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getClient

        public net.spy.memcached.MemcachedClient getClient()
      • get

        @Nullable
        public java.lang.Object get​(@Nonnull
                                    java.lang.String key)
        Specified by:
        get in interface CacheImpl
      • clear

        public void clear()
        Specified by:
        clear in interface CacheImpl
      • delete

        public void delete​(@Nonnull
                           java.lang.String key)
        Specified by:
        delete in interface CacheImpl
      • set

        public void set​(@Nonnull
                        java.lang.String key,
                        java.lang.Object value,
                        int expiration)
        Specified by:
        set in interface CacheImpl
      • stop

        public void stop()
        Specified by:
        stop in interface CacheImpl