Package oracle.pgx.api
Class Destroyable
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.Destroyable
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
AllPaths
,Analyst
,Partition
,PgxFrameBuilder
,PgxManagedObject
,PgxPath
public abstract class Destroyable extends oracle.pgx.api.internal.ApiObject implements java.lang.AutoCloseable
Sub-classes of Destroyable can be explicitly destroyed
-
-
Constructor Summary
Constructors Constructor Description Destroyable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
CallsdestroyAsync()
without waiting for completion.void
destroy()
Blocking version ofdestroyAsync()
.abstract PgxFuture<java.lang.Void>
destroyAsync()
Requests destruction of this object.
-
-
-
Method Detail
-
destroyAsync
public abstract PgxFuture<java.lang.Void> destroyAsync()
Requests destruction of this object. After this method returns, the behavior of any method of this class becomes undefined.- Returns:
- a future which will be completed once the destruction request finishes.
-
close
public void close()
CallsdestroyAsync()
without waiting for completion.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
destroy
public void destroy() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Blocking version ofdestroyAsync()
. CallsdestroyAsync()
and waits for the returnedPgxFuture
to complete.- Throws:
java.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.
-
-