object Closable
Note: There is a Java-friendly API for this object: com.twitter.util.Closables
.
- Alphabetic
- By Inheritance
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def all(closables: Closable*): Closable
Concurrent composition: creates a new closable which, when closed, closes all of the underlying resources simultaneously.
Concurrent composition: creates a new closable which, when closed, closes all of the underlying resources simultaneously.
- Annotations
- @varargs()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(o: AnyRef, after: Duration): Future[Unit]
Provide Java access to the com.twitter.util.Closable mixin.
- def close(o: AnyRef, deadline: Time): Future[Unit]
Provide Java access to the com.twitter.util.Closable mixin.
- def close(o: AnyRef): Future[Unit]
Provide Java access to the com.twitter.util.Closable mixin.
- def closeOnCollect(closable: Closable, obj: AnyRef): Unit
Close the given closable when
obj
is collected.Close the given closable when
obj
is collected.Care should be taken to ensure that
closable
has no references back toobj
or it will prevent the close from taking place. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def make(f: (Time) => Future[Unit]): Closable
Make a new Closable whose
close
method invokes f. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nop: Closable
A Closable that does nothing —
close
returnsFuture.Done
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def ref(r: AtomicReference[Closable]): Closable
- def sequence(closables: Closable*): Closable
Sequential composition: create a new Closable which, when closed, closes all of the underlying ones in sequence: that is, resource n+1 is not closed until resource n is.
Sequential composition: create a new Closable which, when closed, closes all of the underlying ones in sequence: that is, resource n+1 is not closed until resource n is.
- returns
the first failed Future should any of the
Closables
result in a failed Future. Any subsequent failures are included as suppressed exceptions.
- Annotations
- @varargs()
- Note
as with all
Closables
, thedeadline
passed toclose
is advisory.
- def sequence(a: Closable, b: Closable): Closable
Sequential composition: create a new Closable which, when closed, closes all of the underlying ones in sequence: that is, resource n+1 is not closed until resource n is.
Sequential composition: create a new Closable which, when closed, closes all of the underlying ones in sequence: that is, resource n+1 is not closed until resource n is.
- returns
the first failed Future should any of the
Closables
result in a failed Future. Any subsequent failures are included as suppressed exceptions.
- Note
as with all
Closables
, thedeadline
passed toclose
is advisory.
- def stopCollectClosablesThread(): Unit
Stop CollectClosables thread.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()