Package oracle.pgx.api
Class ServerInstance
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.ServerInstance
-
public class ServerInstance extends oracle.pgx.api.internal.ApiObject
A PGX server instance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PgxSession
createSession(java.lang.String source)
Blocking version ofcreateSessionAsync(String)
.PgxSession
createSession(java.lang.String source, java.lang.Long idleTimeout, java.lang.Long taskTimeout, java.util.concurrent.TimeUnit unit)
Blocking version ofcreateSessionAsync(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.boolean
equals(java.lang.Object obj)
oracle.pgx.common.pojo.admin.CacheStatistics
freeCachedMemory()
Blocking version offreeCachedMemoryAsync()
.oracle.pgx.common.pojo.admin.CacheStatistics
freeCachedMemory(double threshold)
Blocking version offreeCachedMemoryAsync(double)
.PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics>
freeCachedMemoryAsync()
Trigger memory cleanup to free unused graphs if RELEASE_MEMORY_THRESHOLD is reachedPgxFuture<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 ofgetPgxConfigAsync()
.PgxFuture<java.util.Map<PgxConfig.Field,java.lang.Object>>
getPgxConfigAsync()
Gets the PGX config.PgxConfig
getPgxConfigObject()
Blocking version ofgetPgxConfigObjectAsync()
.PgxFuture<PgxConfig>
getPgxConfigObjectAsync()
Gets the PGX config.java.util.Set<PgxGenericPermission>
getPgxGenericPermissions()
Blocking version ofgetPgxGenericPermissionsAsync()
.PgxFuture<java.util.Set<PgxGenericPermission>>
getPgxGenericPermissionsAsync()
Get the static permissions of the current user i.e.java.lang.String
getPgxUsername()
Blocking version ofgetPgxUsernameAsync()
.PgxFuture<java.lang.String>
getPgxUsernameAsync()
Get the name of the current user.java.util.Set<java.lang.String>
getPgxUserRoles()
Blocking version ofgetPgxUserRolesAsync()
.PgxFuture<java.util.Set<java.lang.String>>
getPgxUserRolesAsync()
Get the roles of the current user.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 ofgetServerStateAsync()
.PgxFuture<com.fasterxml.jackson.databind.JsonNode>
getServerStateAsync()
Gets the server state info.PgxSession
getSession(java.lang.String id)
Blocking version ofgetSessionAsync(String)
.PgxSession
getSession(SessionContext sessionContext)
Blocking version ofgetSessionAsync(SessionContext)
.PgxFuture<PgxSession>
getSessionAsync(java.lang.String id)
Gets a session by ID.PgxFuture<PgxSession>
getSessionAsync(SessionContext sessionContext)
Gets a session bySessionContext
.java.lang.Integer
getUploadBatchSize()
Gets the uploadBatchSize of this instance.oracle.pgx.common.VersionInfo
getVersion()
Blocking version ofgetVersionAsync()
.PgxFuture<oracle.pgx.common.VersionInfo>
getVersionAsync()
Gets the PGX extended version of this instance.int
hashCode()
boolean
isEmbeddedInstance()
Checks if is embedded instance.boolean
isEngineReady()
Blocking version ofisEngineReadyAsync()
.PgxFuture<java.lang.Boolean>
isEngineReadyAsync()
Check if the engine is ready to accept new requestsboolean
isEngineRunning()
Blocking version ofisEngineRunningAsync()
.PgxFuture<java.lang.Boolean>
isEngineRunningAsync()
Check if the engine is currently upboolean
isGraphPreloadingDone()
Blocking version ofisGraphPreloadingDoneAsync()
.PgxFuture<java.lang.Boolean>
isGraphPreloadingDoneAsync()
Check if the preloading of the graphs has completedvoid
killSession(java.lang.String sessionId)
Blocking version ofkillSessionAsync(String)
.PgxFuture<java.lang.Void>
killSessionAsync(java.lang.String sessionId)
Kill a session.void
setSessionIdleTimeout(java.lang.String sessionId, long idleTimeout, java.util.concurrent.TimeUnit unit)
Blocking version ofsetSessionIdleTimeoutAsync(String, long, TimeUnit)
.PgxFuture<java.lang.Void>
setSessionIdleTimeoutAsync(java.lang.String sessionId, long idleTimeout, java.util.concurrent.TimeUnit unit)
Updates the session idle timeout.PgxFuture<java.lang.Void>
setSessionMaxMemorySize(PgxSession session, int size, oracle.pgx.common.MemoryUnit unit)
Set the maximum memory limit for the given session.void
setToken(java.lang.String token)
Sets the current auth token for thisServerInstance
.boolean
shutdownEngine(long timeout, java.util.concurrent.TimeUnit unit)
Blocking version ofshutdownEngineAsync(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 ofshutdownEngineNowAsync()
.PgxFuture<java.lang.Void>
shutdownEngineNowAsync()
Forces the engine to stop and clean up resources.void
shutdownEngineNowIfRunning()
Blocking version ofshutdownEngineNowIfRunningAsync()
.PgxFuture<java.lang.Void>
shutdownEngineNowIfRunningAsync()
If the engine is currently up forces it to stop and clean up resources.void
startEngine()
Blocking version ofstartEngineAsync()
.void
startEngine(java.io.InputStream config)
Blocking version ofstartEngineAsync(InputStream)
.void
startEngine(java.lang.String path)
Blocking version ofstartEngineAsync(String)
.void
startEngine(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Blocking version ofstartEngineAsync(Map)
.void
startEngine(PgxConfig config)
Blocking version ofstartEngineAsync(PgxConfig)
.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.lang.String path)
Starts the PGX engine with a custom configuration given as path.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.java.lang.String
toString()
void
unpinGraph(java.lang.String graphName)
Blocking version ofunpinGraphAsync(String)
(String, long)}.PgxFuture<java.lang.Void>
unpinGraphAsync(java.lang.String graphName)
Unpins the specified published graph so that if no session uses any of its snapshot, it can be removed.void
updatePgxConfig(java.io.InputStream config)
Blocking version ofupdatePgxConfigAsync(InputStream)
.void
updatePgxConfig(java.lang.String path)
Blocking version ofupdatePgxConfigAsync(String)
.void
updatePgxConfig(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Blocking version ofupdatePgxConfigAsync(Map)
.void
updatePgxConfig(PgxConfig config)
Blocking version ofupdatePgxConfigAsync(PgxConfig)
.PgxFuture<java.lang.Void>
updatePgxConfigAsync(java.io.InputStream 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.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.
-
-
-
Method Detail
-
isEmbeddedInstance
public boolean isEmbeddedInstance()
Checks if is embedded instance.- Returns:
- true, if is embedded instance
-
getBaseUrl
public java.lang.String getBaseUrl()
Gets the base url this instance object is pointing to.- Returns:
- base url
-
getPrefetchSize
public java.lang.Integer getPrefetchSize()
Gets the prefetchSize of this instance. Note that prefetchSize is ignored if this instance is an embedded instance (isEmbeddedInstance()
).- Returns:
- the prefetchSize.
-
getUploadBatchSize
public java.lang.Integer getUploadBatchSize()
Gets the uploadBatchSize of this instance. Note that uploadBatchSize is ignored if this instance is an embedded instance (isEmbeddedInstance()
).- Returns:
- the uploadBatchSize.
-
getRemoteFutureTimeout
public java.lang.Integer getRemoteFutureTimeout()
Gets the remoteFutureTimeout of this instance. Note that remoteFutureTimeout is ignored if this instance is an embedded instance (isEmbeddedInstance()
).- Returns:
- the remoteFutureTimeout.
-
getClientServerInteractionMode
public InteractionMode getClientServerInteractionMode()
Gets the client/server interaction mode (InteractionMode.BLOCKING
,InteractionMode.ASYNC_POLLING
)- Returns:
- interaction mode.
-
getRemoteFuturePendingRetryInterval
public java.lang.Integer getRemoteFuturePendingRetryInterval()
Gets the remoteFuturePendingRetryInterval of this instance. Note that remoteFuturePendingRetryInterval is ignored if this instance is an embedded instance (isEmbeddedInstance()
).- Returns:
- the remoteFuturePendingRetryInterval.
-
createSessionAsync
public PgxFuture<PgxSession> createSessionAsync(java.lang.String source)
Create a new session.- Parameters:
source
- a descriptive string identifying the client- Returns:
- created session
-
getCore
public PgxFuture<oracle.pgx.api.internal.Core> getCore()
-
getProxyServer
public oracle.pgx.api.internal.ProxyServer getProxyServer()
-
createSessionAsync
public PgxFuture<PgxSession> createSessionAsync(java.lang.String source, java.lang.Long idleTimeout, java.lang.Long taskTimeout, java.util.concurrent.TimeUnit unit)
Creates a new session.- Parameters:
source
- a descriptive string identifying the clientidleTimeout
- if notnull
, tries to overwrite server default idle timeouttaskTimeout
- if notnull
, tries to overwrite server default task timeoutunit
- time unit of idleTimeout and taskTimeout- Returns:
- created session
-
getSessionAsync
public PgxFuture<PgxSession> getSessionAsync(java.lang.String id)
Gets a session by ID.- Parameters:
id
- the session ID- Returns:
- a future completing with the requested PGX session or completing exceptionally if the requested session ID could not be found.
-
getSessionAsync
public PgxFuture<PgxSession> getSessionAsync(SessionContext sessionContext)
Gets a session bySessionContext
.- Parameters:
sessionContext
- the session context- Returns:
- a future completing with the requested PGX session or completing exceptionally if the requested session could not be found.
-
setToken
public void setToken(java.lang.String token)
Sets the current auth token for thisServerInstance
. Note depending on theRealmClient
implementation used, this might not be supported or have no effect.- Parameters:
token
- the new auth token
-
getPgxUsername
public java.lang.String getPgxUsername()
Blocking version ofgetPgxUsernameAsync()
. CallsgetPgxUsernameAsync()
and waits for the returnedPgxFuture
to complete.- Since:
- 21.3.0
-
getPgxUserRoles
public java.util.Set<java.lang.String> getPgxUserRoles()
Blocking version ofgetPgxUserRolesAsync()
. CallsgetPgxUserRolesAsync()
and waits for the returnedPgxFuture
to complete.- Since:
- 21.3.0
-
getPgxGenericPermissions
public java.util.Set<PgxGenericPermission> getPgxGenericPermissions()
Blocking version ofgetPgxGenericPermissionsAsync()
. CallsgetPgxGenericPermissionsAsync()
and waits for the returnedPgxFuture
to complete.- Since:
- 21.3.0
-
getPgxUsernameAsync
public PgxFuture<java.lang.String> getPgxUsernameAsync()
Get the name of the current user. Returnsnull
in embedded mode- Returns:
- the name of the current user
- Since:
- 21.3.0
-
getPgxUserRolesAsync
public PgxFuture<java.util.Set<java.lang.String>> getPgxUserRolesAsync()
Get the roles of the current user. Returnsnull
in embedded mode- Returns:
- the roles of the current user
- Since:
- 21.3.0
-
getPgxGenericPermissionsAsync
public PgxFuture<java.util.Set<PgxGenericPermission>> getPgxGenericPermissionsAsync()
Get the static permissions of the current user i.e. file-location permissions and system permissions. Returnsnull
in embedded mode- Returns:
- set containing the current user's static permissions
- Since:
- 21.3.0
-
getVersionAsync
public PgxFuture<oracle.pgx.common.VersionInfo> getVersionAsync()
Gets the PGX extended version of this instance.- Returns:
- VersionInfo holding information about this PGX version
-
getPgxConfigAsync
public PgxFuture<java.util.Map<PgxConfig.Field,java.lang.Object>> getPgxConfigAsync()
Gets the PGX config.- Returns:
- current PGX server configuration as JSON string
-
getPgxConfigObjectAsync
public PgxFuture<PgxConfig> getPgxConfigObjectAsync()
Gets the PGX config.- Returns:
- current PGX server configuration as PgxConfig instance
-
startEngineAsync
public PgxFuture<java.lang.Void> startEngineAsync()
Starts the PGX engine.
-
startEngineAsync
public PgxFuture<java.lang.Void> startEngineAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Starts the PGX engine with a custom configuration.- Parameters:
config
- the config
-
startEngineAsync
public PgxFuture<java.lang.Void> startEngineAsync(java.io.InputStream config)
Starts the PGX engine with a custom configuration.- Parameters:
config
- the config
-
startEngineAsync
public PgxFuture<java.lang.Void> startEngineAsync(PgxConfig config)
Starts the PGX engine with a custom configuration.- Parameters:
config
- the config
-
startEngineAsync
public PgxFuture<java.lang.Void> startEngineAsync(java.lang.String path)
Starts the PGX engine with a custom configuration given as path.- Parameters:
path
- the path may be prefixed with resource handlers.- See Also:
- Path syntax documentation
-
updatePgxConfigAsync
public PgxFuture<java.lang.Void> updatePgxConfigAsync(PgxConfig config)
Replaces the current PGX config with the given configuration. This only affects static permissions (i.e. non-graph) and redaction rules for pre-loaded graphs. Existing permissions on graphs and frames will not be changed.- Parameters:
config
- PGX config containing the new authorization config
-
updatePgxConfigAsync
public PgxFuture<java.lang.Void> updatePgxConfigAsync(java.util.Map<PgxConfig.Field,java.lang.Object> config)
Replaces the current PGX config with the given configuration. This only affects static permissions (i.e. non-graph) and redaction rules for pre-loaded graphs. Existing permissions on graphs and frames will not be changed.- Parameters:
config
- PGX config containing the new authorization config
-
updatePgxConfigAsync
public PgxFuture<java.lang.Void> updatePgxConfigAsync(java.io.InputStream config)
Replaces the current PGX config with the given configuration. This only affects static permissions (i.e. non-graph) and redaction rules for pre-loaded graphs. Existing permissions on graphs and frames will not be changed.- Parameters:
config
- stream that can be read to a PGX config containing the new authorization config
-
updatePgxConfigAsync
public PgxFuture<java.lang.Void> updatePgxConfigAsync(java.lang.String path)
Replaces the current PGX config with the given configuration. This only affects static permissions (i.e. non-graph) and redaction rules for pre-loaded graphs. Existing permissions on graphs and frames will not be changed.- Parameters:
path
- path pointing to a PGX config file
-
isEngineRunningAsync
public PgxFuture<java.lang.Boolean> isEngineRunningAsync()
Check if the engine is currently up- Returns:
- true if engine is currently running and using less than RUNNING_MEMORY_USAGE_RATIO, false otherwise
-
isEngineReadyAsync
public PgxFuture<java.lang.Boolean> isEngineReadyAsync()
Check if the engine is ready to accept new requests- Returns:
- true if engine is using less than READINESS_MEMORY_USAGE_RATIO , false otherwise
-
isGraphPreloadingDoneAsync
public PgxFuture<java.lang.Boolean> isGraphPreloadingDoneAsync()
Check if the preloading of the graphs has completed- Returns:
- true if engine has finished loading the preloaded graphs, false otherwise
-
shutdownEngineAsync
public PgxFuture<java.lang.Boolean> shutdownEngineAsync(long timeout, java.util.concurrent.TimeUnit unit)
Gracefully shuts down the engine and cleans up resources. All currently enqueued tasks will be worked off prior shut down, new incoming requests get rejected. This call blocks until shut down is complete or timed out.- Returns:
- true if gracefully shut down. false if timed out before shut down.
-
shutdownEngineNowAsync
public PgxFuture<java.lang.Void> shutdownEngineNowAsync()
Forces the engine to stop and clean up resources. Currently running tasks are interrupted. New incoming requests get rejected.
Throws an exception when current tasks didn't finish after a short grace period.
-
shutdownEngineNowIfRunningAsync
public PgxFuture<java.lang.Void> shutdownEngineNowIfRunningAsync()
If the engine is currently up forces it to stop and clean up resources. Currently running tasks are interrupted. New incoming requests get rejected.
-
setSessionIdleTimeoutAsync
public PgxFuture<java.lang.Void> setSessionIdleTimeoutAsync(java.lang.String sessionId, long idleTimeout, java.util.concurrent.TimeUnit unit)
Updates the session idle timeout.- Parameters:
sessionId
- the session ididleTimeout
- the new idle timeout valueunit
- the unit in which the idle timeout is presented (example:TimeUnit.SECONDS
)- Since:
- 24.3.0
-
setSessionIdleTimeout
public void setSessionIdleTimeout(java.lang.String sessionId, long idleTimeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofsetSessionIdleTimeoutAsync(String, long, TimeUnit)
.- Parameters:
sessionId
- the session ididleTimeout
- the new idle timeout valueunit
- the unit in which the idle timeout is presented (example:TimeUnit.SECONDS
)- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
- Since:
- 24.3.0
-
getServerStateAsync
public PgxFuture<com.fasterxml.jackson.databind.JsonNode> getServerStateAsync()
Gets the server state info.- Returns:
- sessions, graphs, tasks, threadPools and memory statistics
- Since:
- 2.7.0
-
freeCachedMemoryAsync
public PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics> freeCachedMemoryAsync()
Trigger memory cleanup to free unused graphs if RELEASE_MEMORY_THRESHOLD is reached- Returns:
- amount of released memory
- See Also:
for more details.
-
freeCachedMemoryAsync
public PgxFuture<oracle.pgx.common.pojo.admin.CacheStatistics> freeCachedMemoryAsync(double threshold)
Trigger memory cleanup to free unused graphs if threshold is reached.- Parameters:
threshold
- percentage of used memory after which the engine starts freeing un-used graphs- Returns:
- amount of released memory
- See Also:
for more details.
-
killSessionAsync
public PgxFuture<java.lang.Void> killSessionAsync(java.lang.String sessionId)
Kill a session.- Parameters:
sessionId
- the session to be killed
-
unpinGraphAsync
public PgxFuture<java.lang.Void> unpinGraphAsync(java.lang.String graphName)
Unpins the specified published graph so that if no session uses any of its snapshot, it can be removed.- Parameters:
graphName
- name of the published graph to unpin
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getVersion
public oracle.pgx.common.VersionInfo getVersion() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetVersionAsync()
. CallsgetVersionAsync()
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.
-
createSession
public PgxSession createSession(java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofcreateSessionAsync(String)
. CallscreateSessionAsync(String)
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.
-
getSession
public PgxSession getSession(java.lang.String id) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetSessionAsync(String)
. CallsgetSessionAsync(String)
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.
-
getSession
public PgxSession getSession(SessionContext sessionContext) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetSessionAsync(SessionContext)
. CallsgetSessionAsync(SessionContext)
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.
-
createSession
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
Blocking version ofcreateSessionAsync(String)
. CallscreateSessionAsync(String)
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.
-
getPgxConfig
public java.util.Map<PgxConfig.Field,java.lang.Object> getPgxConfig() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetPgxConfigAsync()
. CallsgetPgxConfigAsync()
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.
-
getPgxConfigObject
public PgxConfig getPgxConfigObject() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetPgxConfigObjectAsync()
. CallsgetPgxConfigObjectAsync()
and waits for 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.
-
startEngine
public void startEngine(java.lang.String path) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstartEngineAsync(String)
. CallsstartEngineAsync(String)
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.
-
isEngineRunning
public boolean isEngineRunning() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofisEngineRunningAsync()
. CallsisEngineRunningAsync()
and waits for 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.
-
isEngineReady
public boolean isEngineReady() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofisEngineReadyAsync()
. CallsisEngineReadyAsync()
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.
-
isGraphPreloadingDone
public boolean isGraphPreloadingDone() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofisGraphPreloadingDoneAsync()
. CallsisGraphPreloadingDoneAsync()
and waits for 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.
-
shutdownEngine
public boolean shutdownEngine(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofshutdownEngineAsync(long, TimeUnit)
. CallsshutdownEngineAsync(long, TimeUnit)
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.
-
shutdownEngineNow
public void shutdownEngineNow() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofshutdownEngineNowAsync()
. CallsshutdownEngineNowAsync()
and waits for 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.
-
shutdownEngineNowIfRunning
public void shutdownEngineNowIfRunning() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofshutdownEngineNowIfRunningAsync()
. CallsshutdownEngineNowIfRunningAsync()
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.
-
getServerState
public com.fasterxml.jackson.databind.JsonNode getServerState() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofgetServerStateAsync()
. CallsgetServerStateAsync()
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.- Since:
- 2.7.0
-
freeCachedMemory
public oracle.pgx.common.pojo.admin.CacheStatistics freeCachedMemory() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version offreeCachedMemoryAsync()
. CallsfreeCachedMemoryAsync()
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.
-
freeCachedMemory
public oracle.pgx.common.pojo.admin.CacheStatistics freeCachedMemory(double threshold) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version offreeCachedMemoryAsync(double)
. CallsfreeCachedMemoryAsync(double)
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.
-
killSession
public void killSession(java.lang.String sessionId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofkillSessionAsync(String)
. CallskillSessionAsync(String)
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.
-
startEngine
public void startEngine() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstartEngineAsync()
. CallsstartEngineAsync()
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.
-
startEngine
public void startEngine(java.util.Map<PgxConfig.Field,java.lang.Object> config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstartEngineAsync(Map)
. CallsstartEngineAsync(Map)
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.
-
startEngine
public void startEngine(java.io.InputStream config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstartEngineAsync(InputStream)
. CallsstartEngineAsync(InputStream)
and waits for 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.
-
startEngine
public void startEngine(PgxConfig config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofstartEngineAsync(PgxConfig)
. CallsstartEngineAsync(PgxConfig)
and waits for 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.
-
updatePgxConfig
public void updatePgxConfig(PgxConfig config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofupdatePgxConfigAsync(PgxConfig)
. CallsupdatePgxConfigAsync(PgxConfig)
and waits for 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.
-
unpinGraph
public void unpinGraph(java.lang.String graphName)
Blocking version ofunpinGraphAsync(String)
(String, long)}. CallsunpinGraphAsync(String)
and waits for returnedPgxFuture
to complete.
-
updatePgxConfig
public void updatePgxConfig(java.util.Map<PgxConfig.Field,java.lang.Object> config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofupdatePgxConfigAsync(Map)
. CallsupdatePgxConfigAsync(Map)
and waits for 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.
-
updatePgxConfig
public void updatePgxConfig(java.io.InputStream config) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofupdatePgxConfigAsync(InputStream)
. CallsupdatePgxConfigAsync(InputStream)
and waits for 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.
-
updatePgxConfig
public void updatePgxConfig(java.lang.String path) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Blocking version ofupdatePgxConfigAsync(String)
. CallsupdatePgxConfigAsync(String)
and waits for 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.
-
setSessionMaxMemorySize
public PgxFuture<java.lang.Void> setSessionMaxMemorySize(PgxSession session, int size, oracle.pgx.common.MemoryUnit unit)
Set the maximum memory limit for the given session.- Parameters:
session
- on which session to apply the memory limitsize
- memory limit to be set relative to the provided MemoryUnitunit
- the MemoryUnit to use for the given size Only supports MemoryUnit.MEGABYTE, MemoryUnit.GIGABYTE, and MemoryUnit.TERABYTE Requires SERVER_MANAGE permission- Since:
- 20.2.1
-
-