object DelayUtil extends NamedLogging
Utility to create futures that succeed after a given delay.
Inspired by the odelay library, but with a restricted interface to avoid hazardous effects that could be caused by the use of a global executor service.
TODO(i4245): Replace all usages by Clock.
- Alphabetic
- By Inheritance
- DelayUtil
- NamedLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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() @IntrinsicCandidate()
- def delay(name: String, delay: FiniteDuration, performUnlessClosing: PerformUnlessClosing)(implicit traceContext: TraceContext): Future[Unit]
Creates a future that succeeds after the given delay provided that
flagCloseable
has not yet been closed then.Creates a future that succeeds after the given delay provided that
flagCloseable
has not yet been closed then.Try to use
Clock
instead! - def delay(delay: FiniteDuration): Future[Unit]
Creates a future that succeeds after the given delay.
Creates a future that succeeds after the given delay. The caller must make sure that the future is used only in execution contexts that have not yet been closed. Use the
delay(FiniteDuration, FlagCloseable)
method if this might be an issue.Try to use
Clock
instead! - def delayIfNotClosing(name: String, delay: FiniteDuration, onShutdownRunner: OnShutdownRunner)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
Creates a future that succeeds after the given delay provided that
onShutdownRunner
has not yet been closed then.Creates a future that succeeds after the given delay provided that
onShutdownRunner
has not yet been closed then. The future completes fast with UnlessShutdown.AbortedDueToShutdown ifonShutdownRunner
is already closing. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- Definition Classes
- DelayUtil → NamedLogging
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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])