resource

ConstantManagedResource

Related Doc: package resource

final class ConstantManagedResource[V] extends AbstractManagedResource[V]

ConstantManagedResource encapsulates a constant value with no associated resource management.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConstantManagedResource
  2. AbstractManagedResource
  3. ManagedResourceOperations
  4. ManagedResource
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConstantManagedResource(value: V)

Value Members

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

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

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

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

    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: (V) ⇒ B): ExtractedEither[List[Throwable], B]

    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[(V, B)]

    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: (V) ⇒ B): B

    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

    Definition Classes
    Any
  9. def clone(): AnyRef

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

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

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

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

    [use case]

    [use case]
    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
    Full Signature

    def flatMap[B](f: (V) ⇒ ManagedResource[B]): ManagedResource[B]

  14. def flatMap[B](f: (R) ⇒ Traversable[B]): Traversable[B]

    [use case]

    [use case]
    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
    Full Signature

    def flatMap[B](f: (V) ⇒ ManagedResource[B]): ManagedResource[B]

  15. def flatMap[B](f: (R) ⇒ ManagedResource[B]): ManagedResource[B]

    [use case]

    [use case]
    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
    Full Signature

    def flatMap[B](f: (V) ⇒ ManagedResource[B]): ManagedResource[B]

  16. def foreach(f: (V) ⇒ Unit): Unit

    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
  17. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  19. def isFatal(t: Throwable): Boolean

    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
    AbstractManagedResource
  20. final def isInstanceOf[T0]: Boolean

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

    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
    AbstractManagedResource
  22. def map[B](f: (V) ⇒ B): ExtractableManagedResource[B]

    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
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  26. def open: V

    Simply return the value given at construction.

    Simply return the value given at construction.

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

    Definition Classes
    AnyRef
  28. def toFuture(implicit context: ExecutionContext): Future[V]

    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
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. def toTraversable[B](implicit ev: <:<[V, TraversableOnce[B]]): Traversable[B]

    This method creates a Traversable in which all performed methods are done within the context of an "open" resource.

    This method creates a Traversable in which all performed methods are done within the context of an "open" resource. Note: Every iteration will attempt to open and close the resource!

    returns

    A Traversable of elements of type B.

    Definition Classes
    ManagedResourceOperationsManagedResource
  31. def unsafeClose(handle: V, errors: Option[Throwable]): Unit

    Nothing needs to be done to close.

    Nothing needs to be done to close.

    Attributes
    protected
    Definition Classes
    ConstantManagedResourceAbstractManagedResource
  32. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AbstractManagedResource[V]

Inherited from ManagedResourceOperations[V]

Inherited from ManagedResource[V]

Inherited from AnyRef

Inherited from Any

Ungrouped