final
class
Manager extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
acquire[R](resource: R)(implicit arg0: Releasable[R]): Unit
-
def
apply[R](resource: R)(implicit arg0: Releasable[R]): R
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
A resource manager.
Resources can be registered with the manager by calling
acquire
; such resources will be released in reverse order of their acquisition when the manager is closed, regardless of any exceptions thrown during use.See the main doc for
Using
for full details of suppression behavior.It is recommended for API designers to require an implicit
Manager
for the creation of custom resources, and to callacquire
during those resources' construction. Doing so guarantees that the resource must be automatically managed, and makes it impossible to forget to do so. Example: