public final class CpuEnvironment
extends oracle.pgx.api.internal.ApiObject
AnalysisTaskConfig| Modifier and Type | Method and Description |
|---|---|
int |
getMaxNumThreads()
Blocking version of
getMaxNumThreadsAsync(). |
PgxFuture<java.lang.Integer> |
getMaxNumThreadsAsync() |
TaskPriority |
getPriority()
Blocking version of
getPriorityAsync(). |
PgxFuture<TaskPriority> |
getPriorityAsync() |
java.util.Map<java.lang.String,java.lang.Object> |
getValues()
Blocking version of
getValuesAsync(). |
PgxFuture<java.util.Map<java.lang.String,java.lang.Object>> |
getValuesAsync() |
int |
getWeight()
Blocking version of
getWeightAsync(). |
PgxFuture<java.lang.Integer> |
getWeightAsync() |
void |
reset()
Blocking version of
resetAsync(). |
PgxFuture<java.lang.Void> |
resetAsync()
reset the sub environment to the configured default values
|
void |
setMaxNumThreads(java.lang.Integer maxNumThreads)
Blocking version of
setMaxNumThreadsAsync(Integer). |
PgxFuture<java.lang.Void> |
setMaxNumThreadsAsync(java.lang.Integer maxNumThreads)
Sets the limit on the numbers of thread to use to the given value
|
void |
setPriority(TaskPriority priority)
Blocking version of
setPriorityAsync(TaskPriority). |
PgxFuture<java.lang.Void> |
setPriorityAsync(TaskPriority priority)
Sets the priority to the given value
|
void |
setWeight(java.lang.Integer weight)
Blocking version of
setWeightAsync(Integer). |
PgxFuture<java.lang.Void> |
setWeightAsync(java.lang.Integer weight)
Sets the weight to the given value
|
java.lang.String |
toString() |
<T> T |
withMaxNumThreads(int maxNumThreads, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Blocking version of
withMaxNumThreadsAsync(int, Supplier). |
<T> PgxFuture<T> |
withMaxNumThreadsAsync(int maxNumThreads, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Executes the given asynchronous request with the given limit on the number of threads to use
|
<T> T |
withPriority(TaskPriority priority, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Blocking version of
withPriorityAsync(TaskPriority, Supplier). |
<T> PgxFuture<T> |
withPriorityAsync(TaskPriority priority, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Executes the given asynchronous request with the given priority.
|
<T> T |
withWeight(int weight, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Blocking version of
withWeightAsync(int, Supplier). |
<T> PgxFuture<T> |
withWeightAsync(int weight, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Executes the given asynchronous request with the given weight.
|
public int getMaxNumThreads()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
getMaxNumThreadsAsync(). Calls getMaxNumThreadsAsync() and waits for returned PgxFuture to complete.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.public PgxFuture<java.lang.Integer> getMaxNumThreadsAsync()
AnalysisTaskConfig.Field.MAX_THREADSpublic TaskPriority getPriority() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getPriorityAsync(). Calls getPriorityAsync() and waits for returned PgxFuture to complete.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.public PgxFuture<TaskPriority> getPriorityAsync()
AnalysisTaskConfig.Field.PRIORITY
public int getWeight()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
getWeightAsync(). Calls getWeightAsync() and waits for returned PgxFuture to complete.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.public PgxFuture<java.lang.Integer> getWeightAsync()
AnalysisTaskConfig.Field.WEIGHT
public void setMaxNumThreads(java.lang.Integer maxNumThreads)
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
setMaxNumThreadsAsync(Integer). Calls setMaxNumThreadsAsync(Integer) and waits for returned PgxFuture to complete.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.public PgxFuture<java.lang.Void> setMaxNumThreadsAsync(java.lang.Integer maxNumThreads)
maxNumThreads - the new limit on the numbers of threads to useAnalysisTaskConfig.Field.MAX_THREADSpublic void setPriority(TaskPriority priority) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
setPriorityAsync(TaskPriority). Calls setPriorityAsync(TaskPriority) and waits for returned PgxFuture to complete.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.public PgxFuture<java.lang.Void> setPriorityAsync(TaskPriority priority)
priority - the new priorityAnalysisTaskConfig.Field.PRIORITY
public void setWeight(java.lang.Integer weight)
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
setWeightAsync(Integer). Calls setWeightAsync(Integer) and waits for returned PgxFuture to complete.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.public PgxFuture<java.lang.Void> setWeightAsync(java.lang.Integer weight)
weight - the new weightAnalysisTaskConfig.Field.WEIGHT
public <T> T withMaxNumThreads(int maxNumThreads,
java.util.function.Supplier<PgxFuture<T>> asyncRequest)
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
withMaxNumThreadsAsync(int, Supplier). Calls withMaxNumThreadsAsync(int, Supplier) and waits for returned PgxFuture to complete.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.public <T> PgxFuture<T> withMaxNumThreadsAsync(int maxNumThreads, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
maxNumThreads - the temporary limit on the numbers of threads to useasyncRequest - the request to executepublic <T> T withPriority(TaskPriority priority, java.util.function.Supplier<PgxFuture<T>> asyncRequest) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
withPriorityAsync(TaskPriority, Supplier). Calls withPriorityAsync(TaskPriority, Supplier) and waits for returned PgxFuture to complete.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.public <T> PgxFuture<T> withPriorityAsync(TaskPriority priority, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
priority - the temporary priorityasyncRequest - the request to execute
public <T> T withWeight(int weight,
java.util.function.Supplier<PgxFuture<T>> asyncRequest)
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
withWeightAsync(int, Supplier). Calls withWeightAsync(int, Supplier) and waits for returned PgxFuture to complete.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.public <T> PgxFuture<T> withWeightAsync(int weight, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
weight - the temporary weightasyncRequest - the request to execute
public final java.util.Map<java.lang.String,java.lang.Object> getValues()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
getValuesAsync(). Calls getValuesAsync() and waits for returned PgxFuture to complete.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.public final PgxFuture<java.util.Map<java.lang.String,java.lang.Object>> getValuesAsync()
public final void reset()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
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.public final PgxFuture<java.lang.Void> resetAsync()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2016, 2018 Oracle and/or its affiliates. All Rights Reserved.