Packages

p

atmos

dsl

package dsl

The atmos.dsl package defines a domain specific language for constructing and using retry policies.

Linear Supertypes
Deadlines, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. dsl
  2. Deadlines
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AbstractEventMonitorExtensions extends AnyRef

    A base class that adds DSL extension methods for the specified event monitors and actions.

  2. trait AbstractLogEventsExtensions extends AbstractEventMonitorExtensions

    A base class that implements DSL extension methods for all logging event monitors.

  3. trait AbstractPrintEventsExtensions extends AbstractEventMonitorExtensions

    A base class that implements DSL extension methods for all printing event monitors.

  4. type BackoffPolicy = atmos.BackoffPolicy

    An alias to the BackoffPolicy type.

  5. final case class BackoffPolicyExtensions (self: BackoffPolicy) extends AnyVal with Product with Serializable

    Adds DSL extension methods to the backoff policy interface.

    Adds DSL extension methods to the backoff policy interface.

    self

    The backoff policy to add the extension methods to.

  6. case class BackoffPolicyFactory (self: (FiniteDuration) ⇒ BackoffPolicy) extends Product with Serializable

    A factory for duration-based backoff policies.

    A factory for duration-based backoff policies.

    self

    The mapping from durations to backoff policies.

  7. type ErrorClassification = atmos.ErrorClassification

    An alias to the ErrorClassification type.

  8. type ErrorClassifier = PartialFunction[Throwable, atmos.ErrorClassification]

    An alias to the ErrorClassifier type.

  9. trait EventLogLevels [T] extends AnyRef

    A tag for logging system specific level types, used to map generic action names to concrete logging levels.

  10. type EventMonitor = atmos.EventMonitor

    An alias to the EventMonitor type.

  11. final case class LimitAttemptsTerminationFactory (self: Int) extends AnyVal with Product with Serializable

    Adds a termination policy factory named attempts to Int.

    Adds a termination policy factory named attempts to Int.

    self

    The maximum number of attempts that the resulting termination policy will specify.

  12. case class LogEventsWithAkkaExtensions (self: LogEventsWithAkka) extends AbstractLogEventsExtensions with Product with Serializable

    Adds DSL extension methods to the atmos.monitor.LogEventsWithAkka interface.

    Adds DSL extension methods to the atmos.monitor.LogEventsWithAkka interface.

    self

    The Akka event monitor to add the extension methods to.

  13. case class LogEventsWithJavaExtensions (self: LogEventsWithJava) extends AbstractLogEventsExtensions with Product with Serializable

    Exposes extensions on any instance of monitor.LogEventsWithJava.

  14. case class LogEventsWithSlf4jExtensions (self: LogEventsWithSlf4j) extends AbstractLogEventsExtensions with Product with Serializable

    Exposes extensions on any instance of monitor.LogEventsWithSlf4j.

  15. case class PrintEventsWithStreamExtensions (self: PrintEventsWithStream) extends AbstractPrintEventsExtensions with Product with Serializable

    Adds DSL extension methods to the atmos.monitor.PrintEventsWithStream interface.

    Adds DSL extension methods to the atmos.monitor.PrintEventsWithStream interface.

    self

    The print stream event monitor to add the extension methods to.

  16. case class PrintEventsWithWriterExtensions (self: PrintEventsWithWriter) extends AbstractPrintEventsExtensions with Product with Serializable

    Adds DSL extension methods to the atmos.monitor.PrintEventsWithWriter interface.

    Adds DSL extension methods to the atmos.monitor.PrintEventsWithWriter interface.

    self

    The print writer event monitor to add the extension methods to.

  17. type ResultClassification = atmos.ResultClassification

    An alias to the ResultClassification type.

  18. type ResultClassifier = PartialFunction[Any, atmos.ResultClassification]

    An alias to the ResultClassifier type.

  19. sealed trait ResultRejection extends AnyRef
  20. type RetryPolicy = atmos.RetryPolicy

    An alias to the RetryPolicy type.

  21. final case class RetryPolicyExtensions (self: RetryPolicy) extends AnyVal with Product with Serializable

    Adds DSL extension methods to the retry policy interface.

    Adds DSL extension methods to the retry policy interface.

    self

    The retry policy to add the extension methods to.

  22. type TerminationPolicy = atmos.TerminationPolicy

    An alias to the TerminationPolicy type.

  23. final case class TerminationPolicyExtensions (self: TerminationPolicy) extends AnyVal with Product with Serializable

    Adds DSL extension methods to the termination policy interface.

    Adds DSL extension methods to the termination policy interface.

    self

    The termination policy to add the extension methods to.

  24. implicit class DeadlineSupport [T] extends AnyRef

    Extends the Future type with the ability to apply a deadline.

    Extends the Future type with the ability to apply a deadline.

    T

    The underlying type of the wrapped future.

    Definition Classes
    Deadlines

Value Members

  1. val ErrorClassification: atmos.ErrorClassification.type

    An alias to the ErrorClassification companion.

  2. val ErrorClassifier: atmos.ErrorClassifier.type

    An alias to the ErrorClassifier companion.

  3. val ResultClassification: atmos.ResultClassification.type

    An alias to the ResultClassification companion.

  4. val ResultClassifier: atmos.ResultClassifier.type

    An alias to the ResultClassifier companion.

  5. val RetryPolicy: atmos.RetryPolicy.type

    An alias to the RetryPolicy companion.

  6. def acceptResult: ResultClassification

    Returns the Acceptable result classification.

  7. implicit def backoffPolicyToBackoffPolicyExtensions(policy: BackoffPolicy): BackoffPolicyExtensions

    Provides an implicit extension of the backoff policy interface.

    Provides an implicit extension of the backoff policy interface.

    policy

    The backoff policy to extend the interface of.

  8. def constantBackoff: BackoffPolicyFactory

    Creates a backoff policy that uses the same backoff after every attempt.

  9. def exponentialBackoff: BackoffPolicyFactory

    Creates a backoff policy that increases the backoff duration exponentially after every attempt.

  10. def fibonacciBackoff: BackoffPolicyFactory

    Creates a backoff policy that increases the backoff duration by repeatedly multiplying by the an approximation of the golden ratio (8 / 5, the sixth and fifth fibonacci numbers).

  11. implicit def finiteDurationToTerminationPolicy(duration: FiniteDuration): TerminationPolicy

    Creates a termination policy that limits a retry operation to the specified time frame for use in expressions like retryFor { 5.minutes }.

    Creates a termination policy that limits a retry operation to the specified time frame for use in expressions like retryFor { 5.minutes }.

    duration

    The maximum duration that the resulting termination policy will specify.

  12. implicit def finiteDurationToTerminationPolicyExtensions(duration: FiniteDuration): TerminationPolicyExtensions

    Adds logical and and or operators to durations for use in expressions like retryFor { 5.minutes || 5.attempts }.

    Adds logical and and or operators to durations for use in expressions like retryFor { 5.minutes || 5.attempts }.

    duration

    The maximum duration that the resulting termination policy will specify.

  13. implicit def intToLimitAttemptsTerminationPolicyFactory(attempts: Int): LimitAttemptsTerminationFactory

    Provides an implicit factory named attempts to Int for use in expressions like retryFor { 5.attempts }.

    Provides an implicit factory named attempts to Int for use in expressions like retryFor { 5.attempts }.

    attempts

    The maximum number of attempts that resulting termination policies will specify.

  14. def keepRetrying: ErrorClassification

    Returns the Recoverable error classification.

  15. def keepRetryingSilently: ErrorClassification

    Returns the SilentlyRecoverable error classification.

  16. def linearBackoff: BackoffPolicyFactory

    Creates a backoff policy that increases the backoff duration linearly after every attempt.

  17. def logDebug[T](implicit arg0: EventLogLevels[T]): LogAt[T]

    Returns a log action that will submit a log entry at a debug-equivalent level.

  18. def logError[T](implicit arg0: EventLogLevels[T]): LogAt[T]

    Returns a log action that will submit a log entry at an error-equivalent level.

  19. implicit def logEventsWithJavaToLogEventsWithJavaExtensions(policy: LogEventsWithJava): LogEventsWithJavaExtensions

    Provides an implicit extension of the atmos.monitor.LogEventsWithJava interface.

    Provides an implicit extension of the atmos.monitor.LogEventsWithJava interface.

    policy

    The java logging event monitor to extend the interface of.

  20. def logInfo[T](implicit arg0: EventLogLevels[T]): LogAt[T]

    Returns a log action that will submit a log entry at an info-equivalent level.

  21. def logNothing: LogNothing.type

    Returns a log action that will not log anything.

  22. def logWarning[T](implicit arg0: EventLogLevels[T]): LogAt[T]

    Returns a log action that will submit a log entry at a warning-equivalent level.

  23. implicit def loggerToLogEventsWithJava(logger: Logger): LogEventsWithJava

    Creates a new event monitor that submits events to a logger.

    Creates a new event monitor that submits events to a logger.

    logger

    The logger to supply with event messages.

  24. implicit def loggerToLogEventsWithJavaExtensions(logger: Logger): LogEventsWithJavaExtensions

    Creates a new event monitor extension interface for a logger.

    Creates a new event monitor extension interface for a logger.

    logger

    The logger to create a new event monitor extension interface for.

  25. def neverRetry: RetryPolicy

    Creates a new retry policy that immediately terminates.

  26. implicit def printEventsWithStreamToPrintEventsWithStreamExtensions(policy: PrintEventsWithStream): PrintEventsWithStreamExtensions

    Provides an implicit extension of the atmos.monitor.PrintEventsWithStream interface.

    Provides an implicit extension of the atmos.monitor.PrintEventsWithStream interface.

    policy

    The print stream event monitor to extend the interface of.

  27. implicit def printEventsWithWriterToPrintEventsWithWriterExtensions(policy: PrintEventsWithWriter): PrintEventsWithWriterExtensions

    Provides an implicit extension of the atmos.monitor.PrintEventsWithWriter interface.

    Provides an implicit extension of the atmos.monitor.PrintEventsWithWriter interface.

    policy

    The print writer event monitor to extend the interface of.

  28. def printMessage: PrintAction

    Returns a print action that will print only an event message.

  29. def printMessageAndStackTrace: PrintAction

    Returns a print action that will print an event message and stack trace.

  30. def printNothing: PrintAction

    Returns a print action that will print no text.

  31. implicit def printStreamToPrintEventsWithStream(stream: PrintStream): PrintEventsWithStream

    Creates a new event monitor that prints messages to a stream.

    Creates a new event monitor that prints messages to a stream.

    stream

    The stream to print events to.

  32. implicit def printStreamToPrintEventsWithStreamExtensions(stream: PrintStream): PrintEventsWithStreamExtensions

    Creates a new event monitor extension interface for a print stream.

    Creates a new event monitor extension interface for a print stream.

    stream

    The print stream to create a new event monitor extension interface for.

  33. implicit def printWriterToPrintEventsWithWriter(writer: PrintWriter): PrintEventsWithWriter

    Creates a new event monitor that prints messages to a writer.

    Creates a new event monitor that prints messages to a writer.

    writer

    The writer to print events to.

  34. implicit def printWriterToPrintEventsWithWriterExtensions(writer: PrintWriter): PrintEventsWithWriterExtensions

    Creates a new event monitor extension interface for a print writer.

    Creates a new event monitor extension interface for a print writer.

    writer

    The print writer to create a new event monitor extension interface for.

  35. def rejectResult: ResultRejection

    Returns a factory for an Unacceptable result classification with an optional status.

  36. def retry[T](name: Option[String])(operation: ⇒ T)(implicit policy: RetryPolicy, clock: Clock): T

    Performs the specified optionally named operation synchronously, retrying according to the implicit retry policy.

    Performs the specified optionally named operation synchronously, retrying according to the implicit retry policy.

    name

    The optional name of the operation.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    clock

    The clock used to track time and wait out backoff delays.

  37. def retry[T](name: String)(operation: ⇒ T)(implicit policy: RetryPolicy, clock: Clock): T

    Performs the specified named operation synchronously, retrying according to the implicit retry policy.

    Performs the specified named operation synchronously, retrying according to the implicit retry policy.

    name

    The name of the operation.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    clock

    The clock used to track time and wait out backoff delays.

  38. def retry[T]()(operation: ⇒ T)(implicit policy: RetryPolicy, clock: Clock): T

    Performs the specified operation synchronously, retrying according to the implicit retry policy.

    Performs the specified operation synchronously, retrying according to the implicit retry policy.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    clock

    The clock used to track time and wait out backoff delays.

  39. def retryAsync[T](name: Option[String])(operation: ⇒ Future[T])(implicit policy: RetryPolicy, context: ExecutionContext, clock: Clock): Future[T]

    Performs the specified optionally named operation asynchronously, retrying according to the implicit retry policy.

    Performs the specified optionally named operation asynchronously, retrying according to the implicit retry policy.

    name

    The optional name of the operation.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    context

    The execution context to retry on.

    clock

    The clock used to track time and schedule backoff notifications.

  40. def retryAsync[T](name: String)(operation: ⇒ Future[T])(implicit policy: RetryPolicy, context: ExecutionContext, clock: Clock): Future[T]

    Performs the specified optionally named operation asynchronously, retrying according to the implicit retry policy.

    Performs the specified optionally named operation asynchronously, retrying according to the implicit retry policy.

    name

    The name of the operation.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    context

    The execution context to retry on.

    clock

    The clock used to track time and schedule backoff notifications.

  41. def retryAsync[T]()(operation: ⇒ Future[T])(implicit policy: RetryPolicy, context: ExecutionContext, clock: Clock): Future[T]

    Performs the specified operation asynchronously, retrying according to the implicit retry policy.

    Performs the specified operation asynchronously, retrying according to the implicit retry policy.

    operation

    The operation to repeatedly perform.

    policy

    The retry policy to execute with.

    context

    The execution context to retry on.

    clock

    The clock used to track time and schedule backoff notifications.

  42. def retryFor(termination: TerminationPolicy): RetryPolicy

    Creates a new retry policy based on the specified termination policy.

    Creates a new retry policy based on the specified termination policy.

    termination

    The termination policy that will be used by the new retry policy.

  43. def retryForever: RetryPolicy

    Creates a new retry policy that never terminates.

  44. implicit def retryPolicyToRetryPolicyExtensions(policy: RetryPolicy): RetryPolicyExtensions

    Provides an implicit extension of the retry policy interface.

    Provides an implicit extension of the retry policy interface.

    policy

    The retry policy to extend the interface of.

  45. def retrying: RetryPolicy

    Creates a new default retry policy.

  46. def selectedBackoff(f: (Try[Any]) ⇒ BackoffPolicy): BackoffPolicy

    Creates a backoff policy selects another policy based on the most recently evaluated outcome.

    Creates a backoff policy selects another policy based on the most recently evaluated outcome.

    f

    The function that maps from outcomes to backoff policies.

  47. def stopRetrying: ErrorClassification

    Returns the Fatal error classification.

  48. implicit def terminationPolicyToTerminationPolicyExtensions(policy: TerminationPolicy): TerminationPolicyExtensions

    Provides an implicit extension of the termination policy interface.

    Provides an implicit extension of the termination policy interface.

    policy

    The termination policy to extend the interface of.

  49. object AkkaSupport

    Separate namespace for optional Akka support.

  50. object BackoffPolicyFactory extends Serializable

    Factory for backoff policy factories.

  51. object EventLogLevels

    Declarations of the default logging level tags.

  52. object ResultRejection extends ResultRejection
  53. object Slf4jSupport

    Separate namespace for optional SLF4J support.

Inherited from Deadlines

Inherited from AnyRef

Inherited from Any

Ungrouped