Class

com.twitter.collection

BucketGenerationalQueue

Related Doc: package collection

Permalink

class BucketGenerationalQueue[A] extends GenerationalQueue[A]

Improved GenerationalQueue: using a list of buckets responsible for containing elements belonging to a slice of time. For instance: 3 Buckets, First contains elements from 0 to 10, second elements from 11 to 20 and third elements from 21 to 30 We expand the list when we need a new bucket, and compact the list to stash all old buckets into one. There is a slightly difference with the other implementation, when we collect elements we only choose randomly an element in the oldest bucket, as we don't have activity date in this bucket we consider the worst case and then we can miss some expired elements by never find elements that aren't expired.

Linear Supertypes
GenerationalQueue[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BucketGenerationalQueue
  2. GenerationalQueue
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BucketGenerationalQueue(timeout: Duration)

    Permalink

Type Members

  1. class TimeBucket[B] extends HashSet[B]

    Permalink

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. object TimeBucket extends Serializable

    Permalink
  5. def add(a: A): Unit

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect(d: Duration): Option[A]

    Permalink
  9. def collectAll(d: Duration): Iterable[A]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  19. def remove(a: A): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def touch(a: A): Unit

    Permalink
  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( ... )

Inherited from GenerationalQueue[A]

Inherited from AnyRef

Inherited from Any

Ungrouped