Class/Object

com.comcast.xfinity.sirius.uberstore.seqindex

DiskOnlySeqIndex

Related Docs: object DiskOnlySeqIndex | package seqindex

Permalink

class DiskOnlySeqIndex extends SeqIndex

UberStore SeqIndex implementation that has next to no memory overhead at the expense of relying heavily on disk operations. This implementation should play well with the file system cache, which probably does a better job than anything we could put together at the JVM level, so disk operations shouldn't be too terrible.

Offset lookups are done using an on disk binary search.

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

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 close(): Unit

    Permalink

    { Close open file handles.

    { Close open file handles. This SeqIndex should not be used after close is called. }

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  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. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getMaxSeq(): Option[Long]

    Permalink

    { Get the maximum sequence number stored, if such exists

    { Get the maximum sequence number stored, if such exists

    }

    returns

    Some(sequence) or None if none such exists

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  12. def getOffsetFor(soughtSeq: Long): Option[Long]

    Permalink

    { Get the offset for a particular sequence number

    { Get the offset for a particular sequence number

    }

    returns

    Some(offset) if found, None if not

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  13. def getOffsetRange(firstSeq: Long, lastSeq: Long): (Long, Long)

    Permalink

    { Get the range of offsets for entries for sequence numbers between firstSeq and lastSeq, inclusive.

    { Get the range of offsets for entries for sequence numbers between firstSeq and lastSeq, inclusive.

    }

    firstSeq

    first sequence number to look for

    lastSeq

    last sequence number to look for

    returns

    Tuple2[Long, Long] with the first item being the offset of the first entry withing. If the range is empty, (0, -1) is returned

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. var isClosed: Boolean

    Permalink

    Returns whether or not index is closed for use.

    Returns whether or not index is closed for use. Closed indexes should not be used.

    returns

    true if index is closed, false otherwise

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

    Permalink
    Definition Classes
    Any
  17. var maxSeq: Option[Long]

    Permalink
  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. def put(seq: Long, offset: Long): Unit

    Permalink

    { Map seq -> offset, persisting to disk and memory

    { Map seq -> offset, persisting to disk and memory

    This operation is not thread safe relative to other put operations.

    Subsequent Seq/Offset pairs should be strictly increasing, for now behavior is undefined if they are not, in the future we may enforce this more vigorously.ugh

    }

    seq

    sequence number

    offset

    offset

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  22. var size: Long

    Permalink

    Returns the segment size.

    Returns the segment size. If the index is empty then the size is 0.

    returns

    the size of the segment as a Long

    Definition Classes
    DiskOnlySeqIndexSeqIndex
  23. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from SeqIndex

Inherited from AnyRef

Inherited from Any

Ungrouped