rummage

package rummage

The rummage package is a collection of small Scala utilities.

This package consists of self-contained utilities that are too small and general to warrant their own package and/or artifact, but are too large, nuanced or handy to have around to be re-implemented over and over again.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. rummage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AkkaClock(akkaScheduler: Scheduler) extends SystemTime with SyncWaitBySleeping with AsyncWaitWithAkkaScheduler with Product with Serializable

    A clock for use in Akka actors, using system time and Thread.sleep() for synchronous waiting, but using an Akka Scheduler for asynchronous waiting.

    A clock for use in Akka actors, using system time and Thread.sleep() for synchronous waiting, but using an Akka Scheduler for asynchronous waiting.

    akkaScheduler

    The Akka scheduler to use.

  2. trait AkkaClocks extends AnyRef

    A trait that defines when an implicit Akka clock is available.

  3. trait Clock extends AnyRef

    A low-level abstraction over time.

    A low-level abstraction over time. This class supports querying the absolute time and the monitoring flow of time as well as waiting for future times both synchronously and asynchronously.

  4. case class DeadlineException(duration: FiniteDuration) extends RuntimeException with NoStackTrace with Product with Serializable

    The exception returned when a deadline cannot be met.

    The exception returned when a deadline cannot be met.

    duration

    The time limit that was exceeded.

  5. trait Deadlines extends AnyRef

    Definition of the deadline DSL.

  6. case class ScaledClock(factor: Double)(implicit clock: Clock) extends Clock with Product with Serializable

    A clock that scales the progression of time reported by another clock.

    A clock that scales the progression of time reported by another clock.

    The provided factor maps time from the underlying clock into time for the scaled clock. For example: a scale of 2.0 will result in the scaled clock reporting the passage of time twice as quickly as the underlying clock, since every second of real time equates to two seconds of scaled time. Conversely, a scale of 0.5 will result in the scaled clock reporting the passage of time half as quickly as the underlying clock.

    factor

    The scaling factor to apply to the passage of time.

    clock

    The underlying clock to scale the time of.

  7. final class AkkaTimer extends Timer

    A timer implemented with an Akka Scheduler.

    A timer implemented with an Akka Scheduler.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

  8. final class JavaTimer extends Timer

    A timer implemented with a Java ScheduledExecutorService.

    A timer implemented with a Java ScheduledExecutorService.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

  9. trait Timer extends AnyRef

    An interface for scheduling tasks to run one or more times at some point in the future.

    An interface for scheduling tasks to run one or more times at some point in the future.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

Value Members

  1. object AkkaClock extends Serializable

    Support for the AkkaClock class.

  2. object AkkaClocks extends AkkaClocks

    Global access to the implicit Akka clock publisher.

  3. object Clock

    Primary factory and resolver for instances of Clock.

  4. object Deadline

    A factory for deadline-bound futures.

  5. object Deadlines extends Deadlines

    Global implementation of the deadline DSL.

  6. object ScaledClock extends Serializable

    A factory for scaled clocks.

  7. object TryAll

    An extension to the scala.util.Try interface to support aggregated try operations.

    An extension to the scala.util.Try interface to support aggregated try operations.

    This API extends Scala's Try to support situations where you have Try[_ <: Iterable[_]] and want to attempt an operation on all elements of the Iterable contained in the Try and flatten the results of those operations into a single Try.

    This API provides two mechanisms by which you can attempt operations on aggregations:

    • (_: Try[_ <: Iterable[_]]).onEach exposes combinators that will *fail fast*, meaning that it will apply a function to each member of the aggregate and will abort immediately if it encounters a failure on any member.
    • (_: Try[_ <: Iterable[_]]).onEvery exposes combinators that will *fail eventually*, meaning that it will apply a function to every member of the aggregate, collecting any failures it encounters and returning them after all elements have been processed.

    Additionally, this API extends scala.util.Failure with two new failure abstractions:

    • Problem provides a factory and extractor for failures that carry only a message and no stack trace.
    • Failures provides a factory and extractor for failures that are only aggregations of other failures.

Deprecated Value Members

  1. object AkkaTimer

    Factory for timers implemented with an Akka Scheduler.

    Factory for timers implemented with an Akka Scheduler.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

  2. object JavaTimer

    Factory for timers implemented with a Java ScheduledExecutorService.

    Factory for timers implemented with a Java ScheduledExecutorService.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

  3. object Timer extends Timer

    Definitions associated with timers as well as the infrastructure for publishing the global implicit timer.

    Definitions associated with timers as well as the infrastructure for publishing the global implicit timer.

    This object publishes an implicit, lazily-initialized, global timer backed by a single daemon thread. It additionally implements Timer itself and forwards all task submissions to the aforementioned global timer.

    Annotations
    @deprecated
    Deprecated

    (Since version 1.1) Timers are replaced by the Clock API

Inherited from AnyRef

Inherited from Any

Ungrouped