org.mashupbots.socko.infrastructure

LocalCache

class LocalCache extends AnyRef

Local in-memory cache based on Google's ConcurrentLinkedHashMap.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. LocalCache
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LocalCache (capacity: Long, concurrentThreadCount: Int)

    capacity

    Number of items to store. Items in the cache are evicted after this capacity is reached. Defaults to 1000 items.

    concurrentThreadCount

    Number of threads that can concurrently modify the cache. Using a significantly higher or lower value than needed can waste space or lead to thread contention, but an estimate within an order of magnitude of the ideal value does not usually have a noticeable impact. Because placement in hash tables is essentially random, the actual concurrency will vary. Defaults to 16.

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def get (key: String): Option[Any]

    Retrieves the value associated with the specified key

    Retrieves the value associated with the specified key

    key

    Key used in set

    returns

    The value associated with the key. None if key not present in the cache.

  12. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  13. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  14. def isInstanceOf [T0] : Boolean

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

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def remove (key: String): Unit

    Removes the value identified by the key from the cache

    Removes the value identified by the key from the cache

    key

    Unique identifier for the value

  19. def set (key: String, value: Any, timeToLive: Long = 0): Unit

    Puts a value in the cache

    Puts a value in the cache

    key

    Unique identifier for the value

    value

    Value to cache

    timeToLive

    After this number of milliseconds, item will be evicted. If 0 (default), item will stay in the cache indefinitely until the cache's capacity is reached.

  20. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  21. def toString (): String

    Definition Classes
    AnyRef → Any
  22. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any