object Service
- Source
- Service.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Service
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- sealed trait BackOffStrategy extends AnyRef
- final case class ConstantWait(duration: FiniteDuration) extends BackOffStrategy with Product with Serializable
Wait a constant amount of time between retries
- final case class ExponentialBackoff(baseAmount: FiniteDuration) extends BackOffStrategy with Product with Serializable
Simple form of exponential backoff that is simply (tryCount * tryCount * baseAmount)
Simple form of exponential backoff that is simply (tryCount * tryCount * baseAmount)
For a base amount of 1 second you get: retry 1 - 1 Second retry 2 - 4 Seconds retry 3 - 9 seconds retry 4 - 16 seconds
For a base amount of 500 milliseconds you get: retry 1 - 500 milliseconds retry 2 - 2,000 milliseconds retry 3 - 4,500 milliseconds retry 4 - 8,000 milliseconds
- sealed trait LoggingOption extends AnyRef
- final case class SLF4JLogger(logger: org.slf4j.Logger) extends LoggingOption with Product with Serializable
- final case class UseLogger(logger: Logger) extends LoggingOption with Product with Serializable
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 call[X](msg: String = "Calling Service", logging: LoggingOption = UseStdOut, exceptionHandler: PartialFunction[Exception, Unit] = Service.defaultExceptionHandler, delayBetweenCalls: FiniteDuration = Service.defaultDelayBetweenCalls, backOffStrategy: BackOffStrategy = Service.defaultBackOffStrategy, maxRetries: Int = Service.defaultMaxRetries)(f: => X): X
- def callAsync[X](msg: String = "Calling Async Service", logging: LoggingOption = UseStdOut, exceptionHandler: PartialFunction[Exception, Unit] = Service.defaultExceptionHandler, delayBetweenCalls: FiniteDuration = Service.defaultDelayBetweenCalls, backOffStrategy: BackOffStrategy = Service.defaultBackOffStrategy, maxRetries: Int = Service.defaultMaxRetries)(f: => Future[X])(implicit executionContext: ExecutionContext = ExecutionContext.global, timer: ScheduledTaskRunner = ScheduledTaskRunner.global): Future[X]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object BackOffStrategy
- object LoggingOption
- case object NoLogging extends LoggingOption with Product with Serializable
- case object NoWait extends BackOffStrategy with Product with Serializable
Don't wait between retries
- object UseLogger extends Serializable
- case object UseStdOut extends LoggingOption with Product with Serializable