Concurrent composition: creates a new closable which, when closed, closes all of the underlying resources simultaneously.
Provide Java access to the com.twitter.util.Closable mixin.
Provide Java access to the com.twitter.util.Closable mixin.
Provide Java access to the com.twitter.util.Closable mixin.
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 to obj
or it will prevent the close from taking place.
Make a new Closable whose close method invokes f.
A Closable that does nothing immediately.
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.
Note: There is a Java-friendly API for this object: com.twitter.util.Closables.