ICloseable Interface
public interface ICloseable
Defines a standard way of properly closing and disposing objects.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Synchronously closes and disposes any resources associated with this object. |
abstract
Completable |
closeAsync()
Closes and disposes any resources associated with this object. |
Method Details
close
public abstract void close()
Synchronously closes and disposes any resources associated with this object. Calling this method is equivalent of calling closeAsync().get()
. This method blocks until this object is closed.
Throws:
closeAsync
public abstract CompletableFuture
Closes and disposes any resources associated with this object. An object cannot be used after it is closed. This is an asynchronous method that returns a CompletableFuture immediately. This object is completely closed when the returned CompletableFuture is completed.
Returns:
Applies to
Azure SDK for Java