public class ServerInstance
extends oracle.pgx.api.internal.ApiObject
Modifier and Type | Method and Description |
---|---|
void |
addPinnedGraph(GraphConfig cfg)
Blocking version of
addPinnedGraphAsync(GraphConfig) . |
PgxFuture<java.lang.Void> |
addPinnedGraphAsync(GraphConfig cfg)
Add a pinned graph (will not be unloaded by engine) to be shared between sessions
|
PgxSession |
createSession(java.lang.String source)
Blocking version of
createSessionAsync(String) . |
PgxSession |
createSession(java.lang.String source,
java.lang.Long idleTimeout,
java.lang.Long taskTimeout,
java.util.concurrent.TimeUnit unit)
Blocking version of
createSessionAsync(String) . |
PgxFuture<PgxSession> |
createSessionAsync(java.lang.String source)
Create a new session.
|
PgxFuture<PgxSession> |
createSessionAsync(java.lang.String source,
java.lang.Long idleTimeout,
java.lang.Long taskTimeout,
java.util.concurrent.TimeUnit unit)
Creates a new session.
|
void |
demotePinnedGraph(GraphConfig cfg)
Blocking version of
demotePinnedGraphAsync(GraphConfig) . |
PgxFuture<java.lang.Void> |
demotePinnedGraphAsync(GraphConfig cfg)
Demote pinned graph.
|
boolean |
equals(java.lang.Object obj) |
oracle.pgx.common.pojo.admin.CacheStatistics |
freeCachedMemory()
Blocking version of
freeCachedMemoryAsync() . |
oracle.pgx.common.pojo.admin.CacheStatistics |
freeCachedMemory(double threshold)
Blocking version of
freeCachedMemoryAsync(double) . |
PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics> |
freeCachedMemoryAsync()
Trigger memory cleanup to free unused graphs if RELEASE_MEMORY_THRESHOLD is reached
|
PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics> |
freeCachedMemoryAsync(double threshold)
Trigger memory cleanup to free unused graphs if threshold is reached.
|
java.lang.String |
getBaseUrl()
Gets the base url this instance object is pointing to.
|
InteractionMode |
getClientServerInteractionMode()
Gets the client/server interaction mode (
InteractionMode.BLOCKING , InteractionMode.ASYNC_POLLING ) |
PgxFuture<Control> |
getControl() |
PgxFuture<oracle.pgx.api.internal.Core> |
getCore() |
java.util.Map<PgxConfig.Field,java.lang.Object> |
getPgxConfig()
Blocking version of
getPgxConfigAsync() . |
PgxFuture<java.util.Map<PgxConfig.Field,java.lang.Object>> |
getPgxConfigAsync()
Gets the PGX config.
|
PgxConfig |
getPgxConfigObject()
Blocking version of
getPgxConfigObjectAsync() . |
PgxFuture<PgxConfig> |
getPgxConfigObjectAsync()
Gets the PGX config.
|
java.lang.Integer |
getPrefetchSize()
Gets the prefetchSize of this instance.
|
oracle.pgx.api.internal.ProxyServer |
getProxyServer() |
java.lang.Integer |
getRemoteFuturePendingRetryInterval()
Gets the remoteFuturePendingRetryInterval of this instance.
|
java.lang.Integer |
getRemoteFutureTimeout()
Gets the remoteFutureTimeout of this instance.
|
com.fasterxml.jackson.databind.JsonNode |
getServerState()
Blocking version of
getServerStateAsync() . |
PgxFuture<com.fasterxml.jackson.databind.JsonNode> |
getServerStateAsync()
Gets the server state info.
|
PgxSession |
getSession(java.lang.String id)
Blocking version of
getSessionAsync(String) . |
PgxFuture<PgxSession> |
getSessionAsync(java.lang.String id)
Gets a session by ID.
|
java.lang.Integer |
getUploadBatchSize()
Gets the uploadBatchSize of this instance.
|
java.lang.String |
getUsername()
Gets the user name this instance is using
|
oracle.pgx.common.VersionInfo |
getVersion()
Blocking version of
getVersionAsync() . |
PgxFuture<oracle.pgx.common.VersionInfo> |
getVersionAsync()
Gets the PGX extended version of this instance.
|
int |
hashCode() |
boolean |
isEmbeddedInstance()
Checks if is embedded instance.
|
boolean |
isEngineRunning()
Blocking version of
isEngineRunningAsync() . |
PgxFuture<java.lang.Boolean> |
isEngineRunningAsync()
Check if the engine is currently up
|
void |
killSession(java.lang.String sessionId)
Blocking version of
killSessionAsync(String) . |
PgxFuture<java.lang.Void> |
killSessionAsync(java.lang.String sessionId)
Kill a session.
|
void |
resizePool(PoolType poolType,
int parallelism)
Blocking version of
resizePoolAsync(PoolType, int) . |
PgxFuture<java.lang.Void> |
resizePoolAsync(PoolType poolType,
int parallelism)
Resize a pool to use a different degree of parallelism
|
void |
setToken(java.lang.String token) |
boolean |
shutdownEngine(long timeout,
java.util.concurrent.TimeUnit unit)
Blocking version of
shutdownEngineAsync(long, TimeUnit) . |
PgxFuture<java.lang.Boolean> |
shutdownEngineAsync(long timeout,
java.util.concurrent.TimeUnit unit)
Gracefully shuts down the engine and cleans up resources.
|
void |
shutdownEngineNow()
Blocking version of
shutdownEngineNowAsync() . |
PgxFuture<java.lang.Void> |
shutdownEngineNowAsync()
Forces the engine to stop and clean up resources.
|
void |
shutdownEngineNowIfRunning()
Blocking version of
shutdownEngineNowIfRunningAsync() . |
PgxFuture<java.lang.Void> |
shutdownEngineNowIfRunningAsync()
If the engine is currently up forces it to stop and clean up resources.
|
void |
startEngine()
Blocking version of
startEngineAsync() . |
void |
startEngine(java.io.InputStream config)
Blocking version of
startEngineAsync(InputStream) . |
void |
startEngine(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Blocking version of
startEngineAsync(Map) . |
void |
startEngine(PgxConfig config)
Blocking version of
startEngineAsync(PgxConfig) . |
void |
startEngine(java.lang.String path)
Blocking version of
startEngineAsync(String) . |
PgxFuture<java.lang.Void> |
startEngineAsync()
Starts the PGX engine.
|
PgxFuture<java.lang.Void> |
startEngineAsync(java.io.InputStream config)
Starts the PGX engine with a custom configuration.
|
PgxFuture<java.lang.Void> |
startEngineAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Starts the PGX engine with a custom configuration.
|
PgxFuture<java.lang.Void> |
startEngineAsync(PgxConfig config)
Starts the PGX engine with a custom configuration.
|
PgxFuture<java.lang.Void> |
startEngineAsync(java.lang.String path)
Starts the PGX engine with a custom configuration given as path.
|
java.lang.String |
toString() |
void |
updatePgxConfig(java.io.InputStream config)
Blocking version of
updatePgxConfigAsync(InputStream) . |
void |
updatePgxConfig(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Blocking version of
updatePgxConfigAsync(Map) . |
void |
updatePgxConfig(PgxConfig config)
Blocking version of
updatePgxConfigAsync(PgxConfig) . |
void |
updatePgxConfig(java.lang.String path)
Blocking version of
updatePgxConfigAsync(String) . |
PgxFuture<java.lang.Void> |
updatePgxConfigAsync(java.io.InputStream config)
Replaces the current PGX config with the given configuration.
|
PgxFuture<java.lang.Void> |
updatePgxConfigAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Replaces the current PGX config with the given configuration.
|
PgxFuture<java.lang.Void> |
updatePgxConfigAsync(PgxConfig config)
Replaces the current PGX config with the given configuration.
|
PgxFuture<java.lang.Void> |
updatePgxConfigAsync(java.lang.String path)
Replaces the current PGX config with the given configuration.
|
public void addPinnedGraph(GraphConfig cfg) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
addPinnedGraphAsync(GraphConfig)
. Calls addPinnedGraphAsync(GraphConfig)
and waits for the 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> addPinnedGraphAsync(GraphConfig cfg)
cfg
- public PgxSession createSession(java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
createSessionAsync(String)
. Calls createSessionAsync(String)
and waits
for the 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 PgxSession createSession(java.lang.String source, java.lang.Long idleTimeout, java.lang.Long taskTimeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
createSessionAsync(String)
. Calls createSessionAsync(String)
and waits
for the 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<PgxSession> createSessionAsync(java.lang.String source)
source
- a descriptive string identifying the clientpublic PgxFuture<PgxSession> createSessionAsync(java.lang.String source, java.lang.Long idleTimeout, java.lang.Long taskTimeout, java.util.concurrent.TimeUnit unit)
source
- a descriptive string identifying the clientidleTimeout
- if not null
, tries to overwrite server default idle timeouttaskTimeout
- if not null
, tries to overwrite server default task timeoutunit
- time unit of idleTimeout and taskTimeoutpublic void demotePinnedGraph(GraphConfig cfg) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
demotePinnedGraphAsync(GraphConfig)
.
Calls demotePinnedGraphAsync(GraphConfig)
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> demotePinnedGraphAsync(GraphConfig cfg)
cfg
- the cfgpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public oracle.pgx.common.pojo.admin.CacheStatistics freeCachedMemory() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
freeCachedMemoryAsync()
. Calls freeCachedMemoryAsync()
and waits
for the 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 oracle.pgx.common.pojo.admin.CacheStatistics freeCachedMemory(double threshold) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
freeCachedMemoryAsync(double)
. Calls freeCachedMemoryAsync(double)
and waits
for the 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<oracle.pgx.common.pojo.admin.CacheStatistics> freeCachedMemoryAsync()
for more details.
public PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics> freeCachedMemoryAsync(double threshold)
threshold
- percentage of used memory after which the engine starts freeing un-used graphsfor more details.
public java.lang.String getBaseUrl()
public InteractionMode getClientServerInteractionMode()
InteractionMode.BLOCKING
, InteractionMode.ASYNC_POLLING
)public PgxFuture<oracle.pgx.api.internal.Core> getCore()
public java.util.Map<PgxConfig.Field,java.lang.Object> getPgxConfig() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getPgxConfigAsync()
. Calls getPgxConfigAsync()
and waits for the 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.Map<PgxConfig.Field,java.lang.Object>> getPgxConfigAsync()
public PgxConfig getPgxConfigObject() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getPgxConfigObjectAsync()
. Calls getPgxConfigObjectAsync()
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<PgxConfig> getPgxConfigObjectAsync()
public java.lang.Integer getPrefetchSize()
isEmbeddedInstance()
).public oracle.pgx.api.internal.ProxyServer getProxyServer()
public java.lang.Integer getRemoteFuturePendingRetryInterval()
isEmbeddedInstance()
).public java.lang.Integer getRemoteFutureTimeout()
isEmbeddedInstance()
).public com.fasterxml.jackson.databind.JsonNode getServerState() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getServerStateAsync()
. Calls getServerStateAsync()
and waits for the
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<com.fasterxml.jackson.databind.JsonNode> getServerStateAsync()
public PgxSession getSession(java.lang.String id) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getSessionAsync(String)
. Calls getSessionAsync(String)
and waits
for the 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<PgxSession> getSessionAsync(java.lang.String id)
id
- the session IDpublic java.lang.Integer getUploadBatchSize()
isEmbeddedInstance()
).public java.lang.String getUsername()
public oracle.pgx.common.VersionInfo getVersion() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getVersionAsync()
. Calls getVersionAsync()
and waits
for the 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<oracle.pgx.common.VersionInfo> getVersionAsync()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isEmbeddedInstance()
public boolean isEngineRunning() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
isEngineRunningAsync()
. Calls isEngineRunningAsync()
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.Boolean> isEngineRunningAsync()
public void killSession(java.lang.String sessionId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
killSessionAsync(String)
. Calls killSessionAsync(String)
and waits for
the
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> killSessionAsync(java.lang.String sessionId)
sessionId
- the session to be killedpublic void resizePool(PoolType poolType, int parallelism) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
resizePoolAsync(PoolType, int)
. Calls resizePoolAsync(PoolType, int)
and
waits for the 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> resizePoolAsync(PoolType poolType, int parallelism)
poolType
- which pool to resizeparallelism
- the target parallelismpublic void setToken(java.lang.String token)
public boolean shutdownEngine(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
shutdownEngineAsync(long, TimeUnit)
.
Calls shutdownEngineAsync(long, TimeUnit)
and waits for the 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.Boolean> shutdownEngineAsync(long timeout, java.util.concurrent.TimeUnit unit)
public void shutdownEngineNow() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
shutdownEngineNowAsync()
. Calls shutdownEngineNowAsync()
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> shutdownEngineNowAsync()
public void shutdownEngineNowIfRunning() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
shutdownEngineNowIfRunningAsync()
. Calls shutdownEngineNowIfRunningAsync()
and waits for the 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> shutdownEngineNowIfRunningAsync()
public void startEngine() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
startEngineAsync()
. Calls startEngineAsync()
and waits for the 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 void startEngine(java.io.InputStream config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
startEngineAsync(InputStream)
. Calls startEngineAsync(InputStream)
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 void startEngine(java.util.Map<PgxConfig.Field,java.lang.Object> config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
startEngineAsync(Map)
. Calls startEngineAsync(Map)
and waits for the 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 void startEngine(PgxConfig config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
startEngineAsync(PgxConfig)
. Calls startEngineAsync(PgxConfig)
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 void startEngine(java.lang.String path) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
startEngineAsync(String)
. Calls startEngineAsync(String)
and waits for
the
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> startEngineAsync()
public PgxFuture<java.lang.Void> startEngineAsync(java.io.InputStream config)
config
- the configpublic PgxFuture<java.lang.Void> startEngineAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
config
- the configpublic PgxFuture<java.lang.Void> startEngineAsync(PgxConfig config)
config
- the configpublic PgxFuture<java.lang.Void> startEngineAsync(java.lang.String path)
path
- the path may be prefixed with resource handlers.public java.lang.String toString()
toString
in class java.lang.Object
public void updatePgxConfig(java.io.InputStream config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
updatePgxConfigAsync(InputStream)
. Calls
updatePgxConfigAsync(InputStream)
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 void updatePgxConfig(java.util.Map<PgxConfig.Field,java.lang.Object> config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
updatePgxConfigAsync(Map)
. Calls
updatePgxConfigAsync(Map)
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 void updatePgxConfig(PgxConfig config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
updatePgxConfigAsync(PgxConfig)
. Calls
updatePgxConfigAsync(PgxConfig)
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 void updatePgxConfig(java.lang.String path) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
updatePgxConfigAsync(String)
. Calls
updatePgxConfigAsync(String)
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> updatePgxConfigAsync(java.io.InputStream config)
config
- stream that can be read to a PGX config containing the new authorization configpublic PgxFuture<java.lang.Void> updatePgxConfigAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
config
- PGX config containing the new authorization configpublic PgxFuture<java.lang.Void> updatePgxConfigAsync(PgxConfig config)
config
- PGX config containing the new authorization configpublic PgxFuture<java.lang.Void> updatePgxConfigAsync(java.lang.String path)
path
- path pointing to a PGX config fileCopyright © 2015 - 2020 Oracle and/or its affiliates. All Rights Reserved.