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. LocalCache
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    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. final def !=(arg0: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val capacity: Long

    Number of items to store.

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

  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val concurrentThreadCount: Int

    Number of threads that can concurrently modify the cache.

    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.

  8. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  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. final def getClass(): Class[_]

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

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

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

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

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

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

    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped