net.lag.kestrel.config

QueueBuilder

class QueueBuilder extends AnyRef

QueueBuilder produces QueueConfig objects and can resolve the QueueConfig against a parent QueueConfig, inheriting the parent's values wherever the QueueBuilder's defaults are left unmodified. The default queue (see KestrelConfig) inherits exclusively from the defaults in QueueBuilder. Master queues inherit from the default queue. Fanout queues inherit from their master queue.

When constructing a QueueBuilder, values may be overridden as follows: import com.twitter.conversions.time._ new QueueBuilder() { name = "the_queue_name" maxItems = 100 maxAge = 1.day }

Objects are implicitly converted into SpecifiedValue instances. In the case of maxAge the Duration is also wrapped in an option (e.g., Some(1.day)).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. QueueBuilder
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QueueBuilder ()

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def apply (parent: Option[QueueConfig]): QueueConfig

  7. def apply (): QueueConfig

  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. var defaultJournalSize : ConfigValue[StorageUnit]

    If the queue is empty, truncate the journal when it reaches this size.

  11. var discardOldWhenFull : ConfigValue[Boolean]

    If this is false, when a queue is full, clients attempting to add another item will get an error.

    If this is false, when a queue is full, clients attempting to add another item will get an error. No new items will be accepted. If this is true, old items will be discarded to make room for the new one. This settting has no effect unless at least one of maxItems or maxSize is set.

  12. def eq (arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. var expireToQueue : ConfigValue[Option[String]]

    Name of a queue to add expired items to.

    Name of a queue to add expired items to. If set, expired items are added to the requested queue as if by a SET command. This can be used to implement special processing for expired items, or to implement a simple "delayed processing" queue.

  15. var fanoutOnly : ConfigValue[Boolean]

    If true, don't actually store any items in this queue.

    If true, don't actually store any items in this queue. Only deliver them to fanout client queues.

  16. def finalize (): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  18. def hashCode (): Int

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

    Attributes
    final
    Definition Classes
    Any
  20. var keepJournal : ConfigValue[Boolean]

    If false, don't keep a journal file for this queue.

    If false, don't keep a journal file for this queue. When kestrel exits, any remaining contents in the queue will be lost.

  21. var maxAge : ConfigValue[Option[Duration]]

    Expiration time for items on this queue.

    Expiration time for items on this queue. Any item that has been sitting on the queue longer than this duration will be discarded. Clients may also attach an expiration time when adding items to a queue, but if the expiration time is longer than maxAge, max_Age will be used instead.

  22. var maxExpireSweep : ConfigValue[Int]

    Maximum number of expired items to move into the expireToQueue at once.

  23. var maxItemSize : ConfigValue[StorageUnit]

    Set a hard limit on the number of bytes a single queued item can contain.

    Set a hard limit on the number of bytes a single queued item can contain. An add request for an item larger than this will be rejected.

  24. var maxItems : ConfigValue[Int]

    Set a hard limit on the number of items this queue can hold.

    Set a hard limit on the number of items this queue can hold. When the queue is full, discardOldWhenFull dictates the behavior when a client attempts to add another item.

  25. var maxJournalSize : ConfigValue[StorageUnit]

    If the queue fits entirely in memory (see maxMemorySize) and the journal files get larger than this, rebuild the journal.

  26. var maxMemorySize : ConfigValue[StorageUnit]

    Keep only this much of the queue in memory.

    Keep only this much of the queue in memory. The journal will be used to store backlogged items, and they'll be read back into memory as the queue is drained. This setting is a release valve to keep a backed-up queue from consuming all memory.

  27. var maxQueueAge : ConfigValue[Option[Duration]]

    Expiration time for the queue itself.

    Expiration time for the queue itself. If the queue is empty and older than this value then we should delete it.

  28. var maxSize : ConfigValue[StorageUnit]

    Set a hard limit on the number of bytes (of data in queued items) this queue can hold.

    Set a hard limit on the number of bytes (of data in queued items) this queue can hold. When the queue is full, discardOldWhenFull dictates the behavior when a client attempts to add another item.

  29. var name : String

    Name of the queue being configured.

  30. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  31. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  32. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  33. var syncJournal : ConfigValue[Duration]

    How often to sync the journal file.

    How often to sync the journal file. To sync after every write, set this to 0.milliseconds. To never sync, set it to Duration.MaxValue. Syncing the journal will reduce the maximum throughput of the server in exchange for a lower chance of losing data.

  34. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  35. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any