class ThriftWarmup extends AnyRef
A utility for performing requests to endpoints defined by a configured ThriftRouter for the
purpose of warming up the ThriftServer
.
- Note
This only provides routing to user-defined routes of the configured ThriftRouter.
,This is only for use with generated Scala code which uses the ThriftRouter.
- See also
- Alphabetic
- By Inheritance
- ThriftWarmup
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ThriftWarmup(router: ThriftRouter)
- router
the configured com.twitter.finatra.thrift.routing.ThriftRouter
- Annotations
- @Inject()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sendRequest[M <: ThriftMethod](method: M, req: Request[sendRequest.M.Args], times: Int = 1)(responseCallback: (Try[Response[sendRequest.M.SuccessType]]) => Unit = unitFunction): Unit
Send a request to warmup services that are not yet externally receiving traffic.
Send a request to warmup services that are not yet externally receiving traffic.
- M
the type of the com.twitter.scrooge.ThriftMethod
- method
the com.twitter.scrooge.ThriftMethod to request
- req
the com.twitter.scrooge.Request to send
- times
the number of times to send the request
- responseCallback
a callback called for every response where assertions can be made.
- Note
be aware that in the response callback, failed assertions that throw Exceptions could prevent a server from restarting. This is generally when dependent services are unresponsive causing the warm-up request(s) to fail. As such, you should wrap your warm-up calls in these situations in a try/catch {}.
- See also
http://twitter.github.io/finatra/user-guide/thrift/controllers.html
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def close(): Unit
- Annotations
- @deprecated
- Deprecated
(Since version 2018-03-20) This is now a no-op.
- def send[M <: ThriftMethod](method: M, args: send.M.Args, times: Int = 1)(responseCallback: (Try[send.M.SuccessType]) => Unit = unitFunction): Unit
Send a request to warmup services that are not yet externally receiving traffic.
Send a request to warmup services that are not yet externally receiving traffic.
- M
the type of the com.twitter.scrooge.ThriftMethod
- method
thecom.twitter.scrooge.ThriftMethod to request
- args
the com.twitter.scrooge.ThriftMethod.Args to send
- times
the number of times to send the request
- responseCallback
a callback called for every response where assertions can be made.
- Annotations
- @deprecated
- Deprecated
(Since version 2018-12-20) Use Request/Response based functionality
- Note
be aware that in the response callback, failed assertions that throw exceptions could prevent a server from starting. This is generally when dependent services are unresponsive, causing the warm-up request(s) to fail. As such, you should wrap your warm-up calls in these situations in a try/catch {}.