Class

resource

DefaultManagedResource

Related Doc: package resource

Permalink

final class DefaultManagedResource[R] extends AbstractManagedResource[R]

This is the default implementation of a ManagedResource that makes use of the Resource type trait.

Self Type
DefaultManagedResource[R]
Linear Supertypes
AbstractManagedResource[R], ManagedResourceOperations[R], OperationsCompat[R], ManagedResource[R], ManagedResourceCompat[R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DefaultManagedResource
  2. AbstractManagedResource
  3. ManagedResourceOperations
  4. OperationsCompat
  5. ManagedResource
  6. ManagedResourceCompat
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultManagedResource(r: ⇒ R)(implicit arg0: Resource[R], arg1: OptManifest[R])

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def acquireAndGet[B](f: (R) ⇒ B): B

    Permalink

    Acquires the resource for the Duration of a given function, The resource will automatically be opened and closed.

    Acquires the resource for the Duration of a given function, The resource will automatically be opened and closed. The result will be returned immediately, except in the case of an error. Upon error, the resource will be closed, and then the originating exception will be thrown.

    Note: This method will throw the last exception encountered by the managed resource, whatever this happens to be.

    f

    A function to execute against the handle returned by the resource

    returns

    The result of the passed in function

    Definition Classes
    ManagedResourceOperationsManagedResource
  5. def acquireFor[B](f: (R) ⇒ B): ExtractedEither[List[Throwable], B]

    Permalink

    Aquires the resource for the Duration of a given function, The resource will automatically be opened and closed.

    Aquires the resource for the Duration of a given function, The resource will automatically be opened and closed. The result will be returned immediately in an Either container. This container will hold all errors, if any occurred during execution, or the resulting value.

    f

    A function to execute against the raw resource.

    returns

    The result of the function (right) or the list of exceptions seen during the processing of the resource (left).

    Definition Classes
    AbstractManagedResourceManagedResource
  6. def and[B](that: ManagedResource[B]): ManagedResource[(R, B)]

    Permalink

    Creates a new resource that is the aggregation of this resource and another.

    Creates a new resource that is the aggregation of this resource and another.

    that

    the other resource

    returns

    A resource that is a tupled combination of this and that.

    Definition Classes
    ManagedResourceOperationsManagedResource
  7. def apply[B](f: (R) ⇒ B): B

    Permalink

    Acquires the resource for the Duration of a given function, The resource will automatically be opened and closed.

    Acquires the resource for the Duration of a given function, The resource will automatically be opened and closed. The result will be returned immediately, except in the case of an error. Upon error, the resource will be closed, and then the originating exception will be thrown.

    Note: This method will throw the last exception encountered by the managed resource, whatever this happens to be.

    f

    A function to execute against the handle returned by the resource

    returns

    The result of the passed in function

    Definition Classes
    ManagedResourceOperationsManagedResource
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def flatMap[B](f: (R) ⇒ ManagedResource[B]): ManagedResource[B]

    Permalink

    This method is used to immediately perform operations on a resource while it is open, ensuring the resource is closed before returning.

    This method is used to immediately perform operations on a resource while it is open, ensuring the resource is closed before returning.

    f

    The transformation function to apply against the raw resource.

    returns

    A new ManagedResource with the translated type or some other type if an appropriate translator was found.

    Definition Classes
    ManagedResourceOperationsManagedResource
  14. def foreach(f: (R) ⇒ Unit): Unit

    Permalink

    This method is used to immediately perform operations on a resource while it is open, ensuring the resource is closed before returning.

    This method is used to immediately perform operations on a resource while it is open, ensuring the resource is closed before returning. Note: This method *will* open and close the resource, performing the body of the method immediately.

    f

    The function to apply against the raw resource.

    Definition Classes
    ManagedResourceOperationsManagedResource
  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    DefaultManagedResource → AnyRef → Any
  17. def isFatal(t: Throwable): Boolean

    Permalink

    This checks to see if an exception should not be caught, under any circumstances.

    This checks to see if an exception should not be caught, under any circumstances. These usually denote fatal program flaws.

    Attributes
    protected
    Definition Classes
    DefaultManagedResourceAbstractManagedResource
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isRethrown(t: Throwable): Boolean

    Permalink

    These are a list of exceptions we *have* to rethrow, regardless of a users desires to ensure that thread/return behavior in scala is accurate.

    These are a list of exceptions we *have* to rethrow, regardless of a users desires to ensure that thread/return behavior in scala is accurate.

    Attributes
    protected
    Definition Classes
    DefaultManagedResourceAbstractManagedResource
  20. def map[B](f: (R) ⇒ B): ExtractableManagedResource[B]

    Permalink

    This method is used to perform operations on a resource while the resource is open.

    This method is used to perform operations on a resource while the resource is open.

    f

    The transformation function to apply against the raw resource.

    returns

    A new ManagedResource with the translated type or some other type if an appropriate translator was found.

    Definition Classes
    ManagedResourceOperationsManagedResource
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def open: R

    Permalink

    Opens a given resource, returning a handle to execute against during the "session" of the resource being open.

    Opens a given resource, returning a handle to execute against during the "session" of the resource being open.

    Attributes
    protected
    Definition Classes
    DefaultManagedResourceAbstractManagedResource
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toFuture(implicit context: ExecutionContext): Future[R]

    Permalink

    This method creates a Future that will perform operations within the context of an "open" resource.

    This method creates a Future that will perform operations within the context of an "open" resource. Execution of Future will hold error as Failure, otherwise result will be inside a Success.

    Definition Classes
    ManagedResourceOperationsManagedResource
  27. def toString(): String

    Permalink
    Definition Classes
    DefaultManagedResource → AnyRef → Any
  28. def toTraversable[B](implicit ev: <:<[R, TraversableOnce[B]]): Traversable[B]

    Permalink
    Definition Classes
    OperationsCompat
  29. val typeTrait: Resource[R]

    Permalink

    Stable reference to the Resource type trait.

    Stable reference to the Resource type trait.

    Attributes
    protected
  30. def unsafeClose(r: R, error: Option[Throwable]): Unit

    Permalink

    Closes a resource using the handle.

    Closes a resource using the handle. This method will throw any exceptions normally occurring during the closing of a resource.

    Attributes
    protected
    Definition Classes
    DefaultManagedResourceAbstractManagedResource
  31. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractManagedResource[R]

Inherited from ManagedResourceOperations[R]

Inherited from OperationsCompat[R]

Inherited from ManagedResource[R]

Inherited from ManagedResourceCompat[R]

Inherited from AnyRef

Inherited from Any

Ungrouped