Trait/Object

agora.api.exchange

Exchange

Related Docs: object Exchange | package exchange

Permalink

trait Exchange extends JobSyntax

An exchange supports both 'client' requests (e.g. offering and cancelling work to be done) and work subscriptions

Linear Supertypes
JobSyntax, StrictLogging, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Exchange
  2. JobSyntax
  3. StrictLogging
  4. AnyRef
  5. 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. final def cancelJobs(job: JobId, theRest: JobId*): Future[CancelJobsResponse]

    Permalink
  6. def cancelJobs(request: CancelJobs): Future[CancelJobsResponse]

    Permalink

    Cancels the submitted jobs, removing them from the exchange

    Cancels the submitted jobs, removing them from the exchange

    request

    the request containing the jobs to cancel

    returns

    a response containing a map between the input job Ids and a flag depicting if they were successfully cancelled

  7. final def cancelSubscriptions(id: worker.SubscriptionKey, theRest: worker.SubscriptionKey*): Future[CancelSubscriptionsResponse]

    Permalink
  8. def cancelSubscriptions(request: CancelSubscriptions): Future[CancelSubscriptionsResponse]

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def enqueue[T, Out](request: T, overrideDetails: SubmissionDetails)(implicit submitable: Submitable[T], asClient: AsClient[T, Out], ec: ExecutionContext): Future[Out]

    Permalink

    Enqueues a job w/ the overriding details (instead of the ones from the submitting in scope)

    Enqueues a job w/ the overriding details (instead of the ones from the submitting in scope)

    returns

    the single result

    Definition Classes
    JobSyntax
  11. def enqueue[T, Out](request: T)(implicit submitable: Submitable[T], asClient: AsClient[T, Out], ec: ExecutionContext): Future[Out]

    Permalink

    'enqueue' is a convenience method which will then make a request against the matched worker and return that result.

    'enqueue' is a convenience method which will then make a request against the matched worker and return that result.

    Note: It is assumed that the 'enqueue' is used against a job w/ SubmissionDetails which specify only a single worker is chosen. If a mode is provided which returns multiple workers, then 'enqueueAll' is your darling.

    Out

    the result type of the AsClient

    returns

    the result from the single asClient worker

    Definition Classes
    JobSyntax
  12. def enqueueAll[T, Out](request: T)(implicit submitable: Submitable[T], asClient: AsClient[T, Out], ec: ExecutionContext): Future[List[Future[Out]]]

    Permalink

    Similar to 'submit', but returns the responses from the worker.

    Similar to 'submit', but returns the responses from the worker.

    Submit the job, then on the (expected) redirect response, route the work to the given worker using the asClient

    Out

    the response of the AsClient function used to send work to the worker (which may or may not have been the same request)

    returns

    both the original work submission response and the response from the worker

    Definition Classes
    JobSyntax
  13. def enqueueJob[T, Out](value: T, job: SubmitJob)(implicit asClient: AsClient[T, Out], ec: ExecutionContext): Future[List[Future[Out]]]

    Permalink

    eventually we'll get a collection of all the response futures (hence Future[List[Future]])

    eventually we'll get a collection of all the response futures (hence Future[List[Future]])

    returns

    an eventual collection of all the response futures

    Definition Classes
    JobSyntax
  14. def enqueueSingleJob[T, Out](request: T, job: SubmitJob)(implicit asClient: AsClient[T, Out], ec: ExecutionContext): Future[Out]

    Permalink

    Syntax for submitting a job which will either return the first completed or

    Syntax for submitting a job which will either return the first completed or

    Definition Classes
    JobSyntax
  15. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def exchange: Exchange

    Permalink
    Attributes
    protected
    Definition Classes
    ExchangeJobSyntax
  18. def finalize(): Unit

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

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

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

    Permalink
    Definition Classes
    Any
  22. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. def onClientRequest(request: ClientRequest): Future[ClientResponse]

    Permalink

    A convenience method where client requests can be sent through this single function which delegates to the appropriate method.

    A convenience method where client requests can be sent through this single function which delegates to the appropriate method. The 'convenience' in this sense is in terms of pluggability into message handling systems such as actor systems, REST endpoints, etc.

    returns

    the ClientResponse

  27. def onSubscriptionRequest(request: SubscriptionRequest): Future[SubscriptionResponse]

    Permalink

    A convenience method where subscription requests can be sent through this single function which delegates to the appropriate method.

    A convenience method where subscription requests can be sent through this single function which delegates to the appropriate method. The 'convenience' in this sense is in terms of pluggability into message handling systems such as actor systems, REST endpoints, etc.

    returns

    the SubscriptionResponse

  28. def queueState(request: QueueState = QueueState()): Future[QueueStateResponse]

    Permalink

    Queue the state of the exchange

    Queue the state of the exchange

    returns

    the current queue state

  29. def submit(req: SubmitJob): Future[ClientResponse]

    Permalink

    Submit a job to the exchange and trigger a match for work.

    Submit a job to the exchange and trigger a match for work.

    If 'awaitMatch' is specified on the SubmitJob then the response will be a BlockingSubmitJobResponse. Otherwise it will just be sent to the exchange an immediately return a SubmitJobResponse.

    If the submitted job already contains a jobId, then that id will be used and any existing submission with the same Id will be replaced.

    req

    the job request

    returns

    either BlockingSubmitJobResponse or a SubmitJobResponse

  30. def subscribe(request: WorkSubscription, initialRequest: Int)(implicit ec: ExecutionContext): Future[(WorkSubscriptionAck, RequestWorkAck)]

    Permalink

    Convenience method to subscribe and immediately request work items

    Convenience method to subscribe and immediately request work items

    request

    the work subscription

    initialRequest

    the number of work items to request

    ec

    the execution context

    returns

    a tuple of the subscribe ack and request ack

  31. def subscribe(request: WorkSubscription): Future[WorkSubscriptionAck]

    Permalink

    Creates or updates a WorkSubscription, whose returned WorkSubscriptionAck key can be used to pull work items from the exchange.

    Creates or updates a WorkSubscription, whose returned WorkSubscriptionAck key can be used to pull work items from the exchange.

    If the request specifies a subscription key then any existing subscription with the given id will be updated by having its work details combined w/ the existing subscription

    If no subscription key is supplied, then a new one will be generated and provided on the ack.

    request

    the work subscription

    returns

    an ack containing the key needed to request work items

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

    Permalink
    Definition Classes
    AnyRef
  33. final def take(id: worker.SubscriptionKey, itemsRequested: Int): Future[RequestWorkAck]

    Permalink

    convenience method for pulling work items

  34. def take(request: RequestWork): Future[RequestWorkAck]

    Permalink

    request

    the number of work items to request

    returns

    an ack which contains the current known total items requested

  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. def updateSubscriptionDetails(update: UpdateSubscription): Future[UpdateSubscriptionAck]

    Permalink

    Updates the json subscription details referred to by the subscription key.

    Updates the json subscription details referred to by the subscription key.

    See also

    UpdateSubscription for comments

  37. final def wait(): Unit

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

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

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

Inherited from JobSyntax

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped