Class

shade.memcached

MemcachedImpl

Related Doc: package memcached

Permalink

class MemcachedImpl extends Memcached

Memcached client implementation based on SpyMemcached.

See the parent trait (Cache) for API docs.

Linear Supertypes
Memcached, Closeable, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MemcachedImpl
  2. Memcached
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MemcachedImpl(config: Configuration, ec: ExecutionContext)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add[T](key: String, value: T, exp: Duration)(implicit codec: Codec[T]): CancelableFuture[Boolean]

    Permalink

    Adds a value for a given key, if the key doesn't already exist in the cache store.

    Adds a value for a given key, if the key doesn't already exist in the cache store.

    If the key already exists in the cache, the future returned result will be false and the current value will not be overridden. If the key isn't there already, the value will be set and the future returned result will be true.

    The expiry time can be Duration.Inf (infinite duration).

    returns

    either true, in case the value was set, or false otherwise

    Definition Classes
    MemcachedImplMemcached
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def awaitAdd[T](key: String, value: T, exp: Duration)(implicit codec: Codec[T]): Boolean

    Permalink
    Definition Classes
    Memcached
  7. def awaitDecrement(key: String, by: Long, default: Option[Long], exp: Duration): Long

    Permalink
    Definition Classes
    Memcached
  8. def awaitDelete(key: String): Boolean

    Permalink
    Definition Classes
    Memcached
  9. def awaitGet[T](key: String)(implicit codec: Codec[T]): Option[T]

    Permalink
    Definition Classes
    Memcached
  10. def awaitIncrement(key: String, by: Long, default: Option[Long], exp: Duration): Long

    Permalink
    Definition Classes
    Memcached
  11. def awaitSet[T](key: String, value: T, exp: Duration)(implicit codec: Codec[T]): Unit

    Permalink
    Definition Classes
    Memcached
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def close(): Unit

    Permalink

    Shuts down the cache instance, performs any additional cleanups necessary.

    Shuts down the cache instance, performs any additional cleanups necessary.

    Definition Classes
    MemcachedImplMemcached → Closeable → AutoCloseable
  14. def compareAndSet[T](key: String, expecting: Option[T], newValue: T, exp: Duration)(implicit codec: Codec[T]): Future[Boolean]

    Permalink

    Compare and set.

    Compare and set.

    expecting

    should be None in case the key is not expected, or Some(value) otherwise

    exp

    can be Duration.Inf (infinite) for not setting an expiration

    returns

    either true (in case the compare-and-set succeeded) or false otherwise

    Definition Classes
    MemcachedImplMemcached
  15. def decrement(key: String, by: Long, default: Option[Long], exp: Duration): Future[Long]

    Permalink

    Atomically decrements the given key by a non-negative integer amount and returns the new value.

    Atomically decrements the given key by a non-negative integer amount and returns the new value.

    The value is stored as the ASCII decimal representation of a 64-bit unsigned integer.

    If the key does not exist and a default is provided, sets the value of the key to the provided default and expiry time.

    If the key does not exist and no default is provided, or if the key exists with a value that does not conform to the expected representation, the operation will fail.

    If the operation succeeds, it returns the new value of the key.

    Note that the default value is always treated as None when using the text protocol.

    The expiry time can be Duration.Inf (infinite duration).

    Definition Classes
    MemcachedImplMemcached
  16. def delete(key: String): CancelableFuture[Boolean]

    Permalink

    Deletes a key from the cache store.

    Deletes a key from the cache store.

    returns

    true if a key was deleted or false if there was nothing there to delete

    Definition Classes
    MemcachedImplMemcached
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def get[T](key: String)(implicit codec: Codec[T]): Future[Option[T]]

    Permalink

    Fetches a value from the cache store.

    Fetches a value from the cache store.

    returns

    Some(value) in case the key is available, or None otherwise (doesn't throw exception on key missing)

    Definition Classes
    MemcachedImplMemcached
  21. def getAndTransform[T](key: String, exp: Duration)(cb: (Option[T]) ⇒ T)(implicit codec: Codec[T]): Future[Option[T]]

    Permalink

    Transforms the given key and returns the old value as an Option[T] (None in case the key wasn't in the cache or Some(value) otherwise).

    Transforms the given key and returns the old value as an Option[T] (None in case the key wasn't in the cache or Some(value) otherwise).

    The cb callback receives the current value (None in case the key is missing or Some(value) otherwise) and should return the new value to store.

    The method retries until the compare-and-set operation succeeds, so the callback should have no side-effects.

    This function can be used for atomic incrementers and stuff like that.

    returns

    the old value

    Definition Classes
    MemcachedImplMemcached
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def getOrElse[T](key: String, default: ⇒ T)(implicit codec: Codec[T]): Future[T]

    Permalink
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def increment(key: String, by: Long, default: Option[Long], exp: Duration): Future[Long]

    Permalink

    Atomically increments the given key by a non-negative integer amount and returns the new value.

    Atomically increments the given key by a non-negative integer amount and returns the new value.

    The value is stored as the ASCII decimal representation of a 64-bit unsigned integer.

    If the key does not exist and a default is provided, sets the value of the key to the provided default and expiry time.

    If the key does not exist and no default is provided, or if the key exists with a value that does not conform to the expected representation, the operation will fail.

    If the operation succeeds, it returns the new value of the key.

    Note that the default value is always treated as None when using the text protocol.

    The expiry time can be Duration.Inf (infinite duration).

    Definition Classes
    MemcachedImplMemcached
  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. def set[T](key: String, value: T, exp: Duration)(implicit codec: Codec[T]): CancelableFuture[Unit]

    Permalink

    Sets a (key, value) in the cache store.

    Sets a (key, value) in the cache store.

    The expiry time can be Duration.Inf (infinite duration).

    Definition Classes
    MemcachedImplMemcached
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def transformAndGet[T](key: String, exp: Duration)(cb: (Option[T]) ⇒ T)(implicit codec: Codec[T]): Future[T]

    Permalink

    Transforms the given key and returns the new value.

    Transforms the given key and returns the new value.

    The cb callback receives the current value (None in case the key is missing or Some(value) otherwise) and should return the new value to store.

    The method retries until the compare-and-set operation succeeds, so the callback should have no side-effects.

    This function can be used for atomic incrementers and stuff like that.

    returns

    the new value

    Definition Classes
    MemcachedImplMemcached
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Memcached

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped