com.rojoma.simplearm.v2

Managed

abstract class Managed[+A] extends AnyRef

Self Type
Managed[A]
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Managed
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Managed()

Abstract Value Members

  1. abstract def run[B](f: (A) ⇒ B): B

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def and[B](op: (A) ⇒ B): Managed[A]

    Applies a side-effect to the managed resource when it is run.

    Applies a side-effect to the managed resource when it is run. The intent is to be used for things that require a start or other such activation call before they are fully usable.

    for {
      x <- managed(new A).and(_.start())
      y <- managed(new B(x)) // by the time "new B" is called, x will have been started
    } doSomethingWith(x, y)
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def flatMap[B](flatMapper: (A) ⇒ Managed[B]): Managed[B]

  13. final def foreach[B](f: (A) ⇒ B): B

    Alias for "run" to allow Managed to be used in a syntactically lightweight way in for-comprehensions.

    Alias for "run" to allow Managed to be used in a syntactically lightweight way in for-comprehensions. Note this does not return Unit! The result of a for-comprehension that does not have a yield is the the result of running the computation. With a "yield", the computation is delayed and the result is another Managed.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def map[B](mapper: (A) ⇒ B): Managed[B]

    Produces a Managed representing a value extracted from this one.

    Produces a Managed representing a value extracted from this one. The new value DOES NOT HAVE AN ASSOCIATED Resource so it will not be separately closed! Use mapManaged if the extracted resource should be independently managed.

  18. final def mapManaged[B](mapper: (A) ⇒ B)(implicit ev: Resource[B]): Managed[B]

    Produces a Managed representing a resource extracted from this one.

    Produces a Managed representing a resource extracted from this one. The new resource is managed; both the new resource and the original one will be closed, in that order.

    m.mapManaged(f)

    is equivalent to

    m.flatMap { r => managed(f(r)) }
  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped