Package oracle.pgx.api
Class CompiledProgram
java.lang.Object
oracle.pgx.api.internal.ApiObject
oracle.pgx.api.Destroyable
oracle.pgx.api.PgxManagedObject
oracle.pgx.api.CompiledProgram
- All Implemented Interfaces:
AutoCloseable
A compiled Green-Marl program.
-
Method Summary
Modifier and TypeMethodDescriptionstatic oracle.pgx.api.internal.ArgumentconvertArg(Object obj, ArgumentType type, int idx) Requests destruction of this object.booleanGets the argument types.Gets the compiler output.getId()Gets the ID of this program.getName()Alias forgetId().Gets the return type.Gets the session.inthashCode()<T> oracle.pgx.api.internal.AnalysisResult<T>Blocking version ofrunAsync(Object...).<T> oracle.pgx.api.internal.AnalysisResult<T>run(Collection<oracle.pgx.api.internal.characteristic.WorkloadCharacteristic> characteristics, Object... args) Blocking version ofrunAsync(Collection, Object...).<T> oracle.pgx.api.internal.AnalysisResult<T>run(oracle.pgx.api.internal.characteristic.WorkloadCharacteristicPreset characteristics, Object... args) Blocking version ofrunAsync(WorkloadCharacteristicPreset, Object...).<T> PgxFuture<oracle.pgx.api.internal.AnalysisResult<T>>Runs the compiled program with the given parameters.<T> PgxFuture<oracle.pgx.api.internal.AnalysisResult<T>>runAsync(Collection<oracle.pgx.api.internal.characteristic.WorkloadCharacteristic> characteristics, Object... args) Runs the compiled program with the given parameters.<T> PgxFuture<oracle.pgx.api.internal.AnalysisResult<T>>runAsync(oracle.pgx.api.internal.characteristic.WorkloadCharacteristicPreset characteristics, Object... args) Runs the compiled program with the given parameters.toString()Methods inherited from class oracle.pgx.api.Destroyable
close, destroy
-
Method Details
-
getName
Alias forgetId().- Specified by:
getNamein classPgxManagedObject- Returns:
- the ID of this program.
-
getId
Gets the ID of this program.- Returns:
- the ID of this program.
-
getCompilerOutput
Gets the compiler output.- Returns:
- the compiler output (NULL if none).
-
getSession
Gets the session.- Returns:
- the session this program belongs to.
-
destroyAsync
Description copied from class:DestroyableRequests destruction of this object. After this method returns, the behavior of any method of this class becomes undefined.- Specified by:
destroyAsyncin classDestroyable- Returns:
- a future which will be completed once the destruction request finishes.
-
runAsync
Runs the compiled program with the given parameters. If the Green-Marl procedure of this compiled program looks like this:
procedure pagerank(graph G, e double, max int, nodePorp
){...} After, this method can be called PgxGraph g = ... VertexProperty<ID, Double> rank = ... runAsync(g, 0.01, 0.85, 100, rank) - Parameters:
args- all the arguments required by specified procedure- Returns:
- result of analysis as an AnalysisResult
-
runAsync
public <T> PgxFuture<oracle.pgx.api.internal.AnalysisResult<T>> runAsync(Collection<oracle.pgx.api.internal.characteristic.WorkloadCharacteristic> characteristics, Object... args) Runs the compiled program with the given parameters. If the Green-Marl procedure of this compiled program looks like this:
procedure pagerank(graph G, e double, max int, nodePorp
){...} After, this method can be called PgxGraph g = ... VertexProperty<ID, Double> rank = ... runAsync(PoolType.ANALYSIS_POOL, g, 0.01, 0.85, 100, rank) - Parameters:
characteristics- the characteristics of this analysisargs- all the arguments required by specified procedure- Returns:
- result of analysis as an AnalysisResult
- Since:
- 2.5.0
- See Also:
-
WorkloadCharacteristic
-
runAsync
public <T> PgxFuture<oracle.pgx.api.internal.AnalysisResult<T>> runAsync(oracle.pgx.api.internal.characteristic.WorkloadCharacteristicPreset characteristics, Object... args) Runs the compiled program with the given parameters. If the Green-Marl procedure of this compiled program looks like this:
procedure pagerank(graph G, e double, max int, nodePorp
){...} After, this method can be called PgxGraph g = ... VertexProperty<ID, Double> rank = ... runAsync(g, 0.01, 0.85, 100, rank) - Parameters:
characteristics- the characteristics of this analysisargs- all the arguments required by specified procedure- Returns:
- result of analysis as an AnalysisResult
- Since:
- 2.5.0
- See Also:
-
WorkloadCharacteristicPreset
-
equals
- Overrides:
equalsin classPgxManagedObject
-
hashCode
public int hashCode()- Overrides:
hashCodein classPgxManagedObject
-
convertArg
public static oracle.pgx.api.internal.Argument convertArg(Object obj, ArgumentType type, int idx) throws Exception - Throws:
Exception
-
getReturnType
Gets the return type.- Returns:
- the return type
-
getArgumentTypes
Gets the argument types.- Returns:
- the argument types
-
toString
-
run
public <T> oracle.pgx.api.internal.AnalysisResult<T> run(Object... args) throws ExecutionException, InterruptedException Blocking version ofrunAsync(Object...). CallsrunAsync(Object...)and waits for the returnedPgxFutureto complete.- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-
run
public <T> oracle.pgx.api.internal.AnalysisResult<T> run(Collection<oracle.pgx.api.internal.characteristic.WorkloadCharacteristic> characteristics, Object... args) throws ExecutionException, InterruptedException Blocking version ofrunAsync(Collection, Object...). CallsrunAsync(Collection, Object...)and waits for returnedPgxFutureto complete.- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-
run
public <T> oracle.pgx.api.internal.AnalysisResult<T> run(oracle.pgx.api.internal.characteristic.WorkloadCharacteristicPreset characteristics, Object... args) throws ExecutionException, InterruptedException Blocking version ofrunAsync(WorkloadCharacteristicPreset, Object...). CallsrunAsync(WorkloadCharacteristicPreset, Object...)and waits for returnedPgxFutureto complete.- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-