shade.memcached

MemcachedImpl

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

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

    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
  7. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

    Definition Classes
    Memcached
  14. def clone(): AnyRef

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

    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
  16. def compareAndSet[T](key: String, expecting: Option[T], newValue: T, exp: Duration)(implicit codec: Codec[T]): Future[Boolean]

    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
  17. def decrement(key: String, by: Long, default: Option[Long], exp: Duration): Future[Long]

    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
  18. def delete(key: String): CancelableFuture[Boolean]

    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
  19. final def eq(arg0: AnyRef): Boolean

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

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

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

    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
  23. def getAndTransform[T](key: String, exp: Duration)(cb: (Option[T]) ⇒ T)(implicit codec: Codec[T]): Future[Option[T]]

    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
  24. final def getClass(): Class[_]

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

  26. def hashCode(): Int

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

    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
  28. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

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

    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
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

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

    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
  36. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Memcached

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped