Class/Object

com.comcast.xfinity.sirius.writeaheadlog

CachedSiriusLog

Related Docs: object CachedSiriusLog | package writeaheadlog

Permalink

class CachedSiriusLog extends SiriusLog

Wrapper around any implementation of SiriusLog that enables caching.

Linear Supertypes
SiriusLog, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CachedSiriusLog
  2. SiriusLog
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CachedSiriusLog(log: SiriusLog, maxCacheSize: Int)

    Permalink

    log

    SiriusLog to use as backend

    maxCacheSize

    maximum number of events to keep cached

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 clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def compact(): Unit

    Permalink
    Definition Classes
    CachedSiriusLogSiriusLog
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def foldLeft[T](acc0: T)(foldFun: (T, OrderedEvent) ⇒ T): T

    Permalink

    Fold left across the log entries

    Fold left across the log entries

    acc0

    initial accumulator value

    foldFun

    function to apply to the log entry, the result being the new accumulator

    Definition Classes
    SiriusLog
  11. def foldLeftRange[T](startSeq: Long, endSeq: Long)(acc0: T)(foldFun: (T, OrderedEvent) ⇒ T): T

    Permalink

    Fold left across a specified range of log entries

    Fold left across a specified range of log entries

    For bounded LogRange requests, will check write cache first, replying with entries from memory if possible. This should avoid seeking the range on disk in most catch-up cases.

    startSeq

    sequence number to start folding over, inclusive

    endSeq

    sequence number to end folding over, inclusive

    acc0

    the starting value of the accumulator

    foldFun

    function that should take (accumulator, event) and return a new accumulator

    returns

    the final value of the accumulator

    Definition Classes
    CachedSiriusLogSiriusLog
  12. def foreach[T](fun: (OrderedEvent) ⇒ T): Unit

    Permalink

    Apply fun to each entry in the log in order

    Apply fun to each entry in the log in order

    fun

    function to apply

    Definition Classes
    SiriusLog
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getNextSeq: Long

    Permalink

    retrieves the next sequence number to be written

    retrieves the next sequence number to be written

    Definition Classes
    CachedSiriusLogSiriusLog
  15. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def size(): Long

    Permalink

    Calculates size of the SiriusLog.

    Calculates size of the SiriusLog.

    returns

    a measure of size of the SiriusLog

    Definition Classes
    CachedSiriusLogSiriusLog
  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( ... )
  26. def writeEntry(entry: OrderedEvent): Unit

    Permalink

    Write an entry to the log

    Write an entry to the log

    Writes both to disk and to the in-mem write cache. Trims cache if necessary, depending on MAX_CACHE_SIZE.

    Side-effect of updating lastSeq. THIS ASSUMES THAT WRITES OCCUR IN-ORDER.

    entry

    OrderedEvent to write

    Definition Classes
    CachedSiriusLogSiriusLog

Inherited from SiriusLog

Inherited from AnyRef

Inherited from Any

Ungrouped