Trait/Object

shade.memcached

Memcached

Related Docs: object Memcached | package memcached

Permalink

trait Memcached extends Closeable

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

Abstract Value Members

  1. abstract 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

  2. abstract 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
    Memcached → Closeable → AutoCloseable
  3. abstract 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

  4. abstract 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).

  5. abstract 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

  6. abstract 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)

  7. abstract 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 increments and stuff like that.

    returns

    the old value

  8. abstract 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).

  9. abstract 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).

  10. abstract 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 increments and stuff like that.

    returns

    the new value

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

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

    Permalink
  6. def awaitDecrement(key: String, by: Long, default: Option[Long], exp: Duration): Long

    Permalink
  7. def awaitDelete(key: String): Boolean

    Permalink
  8. def awaitGet[T](key: String)(implicit codec: Codec[T]): Option[T]

    Permalink
  9. def awaitIncrement(key: String, by: Long, default: Option[Long], exp: Duration): Long

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

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

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

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped