com.twitter.collection

BucketGenerationalQueue

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BucketGenerationalQueue(timeout: Duration)

Type Members

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

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

  7. def add(a: A): Unit

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  23. def toString(): String

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

  25. def updateBuckets(): Unit

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from GenerationalQueue[A]

Inherited from AnyRef

Inherited from Any

Ungrouped