spark

BoundedMemoryCache

class BoundedMemoryCache extends Cache with Logging

An implementation of Cache that estimates the sizes of its entries and attempts to limit its total memory usage to a fraction of the JVM heap. Objects' sizes are estimated using SizeEstimator, which has limitations; most notably, we will overestimate total memory used if some cache entries have pointers to a shared object. Nonetheless, this Cache should work well when most of the space is used by arrays of primitives or of simple classes.

Linear Supertypes
Logging, Cache, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. BoundedMemoryCache
  2. Logging
  3. Cache
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BoundedMemoryCache()

  2. new BoundedMemoryCache(maxBytes: Long)

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

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def get(datasetId: Any, partition: Int): Any

    Get the value for a given (datasetId, partition), or null if it is not found.

    Get the value for a given (datasetId, partition), or null if it is not found.

    Definition Classes
    BoundedMemoryCacheCache
  12. def getCapacity: Long

    Report the capacity of the cache partition.

    Report the capacity of the cache partition. By default this just reports zero. Specific implementations can choose to provide the capacity number.

    Definition Classes
    BoundedMemoryCacheCache
  13. final def getClass(): java.lang.Class[_]

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

    Definition Classes
    AnyRef → Any
  15. def initLogging(): Unit

    Definition Classes
    Logging
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def log: Logger

    Definition Classes
    Logging
  18. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Definition Classes
    Logging
  19. def logDebug(msg: ⇒ String): Unit

    Definition Classes
    Logging
  20. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Definition Classes
    Logging
  21. def logError(msg: ⇒ String): Unit

    Definition Classes
    Logging
  22. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Definition Classes
    Logging
  23. def logInfo(msg: ⇒ String): Unit

    Definition Classes
    Logging
  24. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Definition Classes
    Logging
  25. def logWarning(msg: ⇒ String): Unit

    Definition Classes
    Logging
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. def newKeySpace(): KeySpace

    Definition Classes
    Cache
  28. final def notify(): Unit

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

    Definition Classes
    AnyRef
  30. def put(datasetId: Any, partition: Int, value: Any): CachePutResponse

    Attempt to put a value in the cache; returns CachePutFailure if this was not successful (e.

    Attempt to put a value in the cache; returns CachePutFailure if this was not successful (e.g. because the cache replacement policy forbids it), and CachePutSuccess if successful. If size estimation is available, the cache implementation should set the size field in CachePutSuccess.

    Definition Classes
    BoundedMemoryCacheCache
  31. def reportEntryDropped(datasetId: Any, partition: Int, entry: Entry): Unit

    Attributes
    protected
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Logging

Inherited from Cache

Inherited from AnyRef

Inherited from Any