public final class ExecutionEnvironment
extends oracle.pgx.api.internal.ApiObject
Constructor and Description |
---|
ExecutionEnvironment(PgxSession session,
oracle.pgx.api.internal.CoreSessionApi coreSessionApi) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsConcurrentTasks()
Blocking version of
allowsConcurrentTasksAsync() . |
PgxFuture<java.lang.Boolean> |
allowsConcurrentTasksAsync()
Checks if the session allows the tasks to run concurrently.
|
CpuEnvironment |
getAnalysisEnvironment() |
CpuEnvironment |
getFastAnalysisEnvironment() |
IoEnvironment |
getIoEnvironment() |
PgxSession |
getSession() |
UpdateConsistencyModel |
getUpdateConsistencyModel()
Blocking version of
getUpdateConsistencyModelAsync() . |
PgxFuture<UpdateConsistencyModel> |
getUpdateConsistencyModelAsync()
Gets the consistency model to be used with in-place updates (if enabled).
|
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
getValues()
Blocking version of
getValuesAsync() . |
PgxFuture<java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>>> |
getValuesAsync() |
void |
reset()
Blocking version of
resetAsync() . |
PgxFuture<java.lang.Void> |
resetAsync()
Resets the environment for this session to the configured default values.
|
void |
resetUpdateConsistencyModel()
Blocking version of
resetUpdateConsistencyModelAsync() . |
PgxFuture<java.lang.Void> |
resetUpdateConsistencyModelAsync()
Resets the consistency model to be used with in-place updates (if enabled) to the default value, as configured
in
PgxConfig.getInPlaceUpdateConsistencyModel() |
void |
setUpdateConsistencyModel(UpdateConsistencyModel model)
Blocking version of
setUpdateConsistencyModelAsync(UpdateConsistencyModel) . |
PgxFuture<java.lang.Void> |
setUpdateConsistencyModelAsync(UpdateConsistencyModel model)
Sets the consistency model to be used with in-place updates (if enabled).
|
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 at most
maxNumThreads . |
<T> T |
withUpdateConsistencyModel(UpdateConsistencyModel model,
java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Blocking version of
withUpdateConsistencyModelAsync(UpdateConsistencyModel, Supplier) . |
<T> PgxFuture<T> |
withUpdateConsistencyModelAsync(UpdateConsistencyModel model,
java.util.function.Supplier<PgxFuture<T>> asyncRequest)
Executes the given asynchronous request with the given consistency model (only relevant if in-place updates are
enabled).
|
public ExecutionEnvironment(PgxSession session, oracle.pgx.api.internal.CoreSessionApi coreSessionApi)
public boolean allowsConcurrentTasks()
allowsConcurrentTasksAsync()
. Calls allowsConcurrentTasksAsync()
and waits for returned PgxFuture
to complete.public PgxFuture<java.lang.Boolean> allowsConcurrentTasksAsync()
public CpuEnvironment getAnalysisEnvironment()
public CpuEnvironment getFastAnalysisEnvironment()
public IoEnvironment getIoEnvironment()
public PgxSession getSession()
public UpdateConsistencyModel getUpdateConsistencyModel()
getUpdateConsistencyModelAsync()
. Calls getUpdateConsistencyModelAsync()
and waits for returned PgxFuture
to complete.public PgxFuture<UpdateConsistencyModel> getUpdateConsistencyModelAsync()
public java.util.List<java.util.Map.Entry<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 PgxFuture<java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>>> getValuesAsync()
public 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 PgxFuture<java.lang.Void> resetAsync()
public void resetUpdateConsistencyModel()
resetUpdateConsistencyModelAsync()
. Calls resetUpdateConsistencyModelAsync()
and waits for returned PgxFuture
to complete.public PgxFuture<java.lang.Void> resetUpdateConsistencyModelAsync()
PgxConfig.getInPlaceUpdateConsistencyModel()
public void setUpdateConsistencyModel(UpdateConsistencyModel model)
setUpdateConsistencyModelAsync(UpdateConsistencyModel)
.
Calls setUpdateConsistencyModelAsync(UpdateConsistencyModel)
and waits for returned PgxFuture
to complete.model
- The desired Consistnecy Modelpublic PgxFuture<java.lang.Void> setUpdateConsistencyModelAsync(UpdateConsistencyModel model)
model
- The desired Consistency Modelpublic java.lang.String toString()
toString
in class java.lang.Object
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
. This affects all task types.maxNumThreads
- the maximum number of threads to use for the requestasyncRequest
- the asynchronous request to executepublic <T> T withUpdateConsistencyModel(UpdateConsistencyModel model, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
withUpdateConsistencyModelAsync(UpdateConsistencyModel, Supplier)
. Calls
withUpdateConsistencyModelAsync(UpdateConsistencyModel, Supplier)
and waits for returned PgxFuture
to complete.public <T> PgxFuture<T> withUpdateConsistencyModelAsync(UpdateConsistencyModel model, java.util.function.Supplier<PgxFuture<T>> asyncRequest)
model
- the update consistency model to useasyncRequest
- the asynchronous request to executeCopyright © 2015 - 2020 Oracle and/or its affiliates. All Rights Reserved.