public class ServerInstance
extends oracle.pgx.api.internal.ApiObject
| Modifier and Type | Method and Description |
|---|---|
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.
|
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(SessionContext sessionContext)
Blocking version of
getSessionAsync(SessionContext). |
PgxSession |
getSession(java.lang.String id)
Blocking version of
getSessionAsync(String). |
PgxFuture<PgxSession> |
getSessionAsync(SessionContext sessionContext)
Gets a session by
SessionContext. |
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
|
boolean |
isGraphPreloadingDone()
Blocking version of
isGraphPreloadingDoneAsync(). |
PgxFuture<java.lang.Boolean> |
isGraphPreloadingDoneAsync()
Check if the preloading of the graphs has completed
|
void |
killSession(java.lang.String sessionId)
Blocking version of
killSessionAsync(String). |
PgxFuture<java.lang.Void> |
killSessionAsync(java.lang.String sessionId)
Kill a session.
|
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 this
ServerInstance. |
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 |
unpinGraph(java.lang.String graphName)
Blocking version of
unpinGraphAsync(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 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 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 boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic 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(SessionContext sessionContext) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getSessionAsync(SessionContext). Calls getSessionAsync(SessionContext) 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 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(SessionContext sessionContext)
SessionContext.sessionContext - the session contextpublic 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.Objectpublic 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 boolean isGraphPreloadingDone()
throws java.util.concurrent.ExecutionException,
java.lang.InterruptedException
isGraphPreloadingDoneAsync(). Calls isGraphPreloadingDoneAsync() 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> isGraphPreloadingDoneAsync()
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 PgxFuture<java.lang.Void> setSessionMaxMemorySize(PgxSession session, int size, oracle.pgx.common.MemoryUnit unit)
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 permissionpublic void setToken(java.lang.String token)
ServerInstance. Note depending on the RealmClient implementation used, this might not be supported or have no effect.token - the new auth tokenpublic 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.Objectpublic void unpinGraph(java.lang.String graphName)
unpinGraphAsync(String) (String, long)}. Calls unpinGraphAsync(String) and waits for returned PgxFuture to complete.public PgxFuture<java.lang.Void> unpinGraphAsync(java.lang.String graphName)
graphName - name of the published graph to unpinpublic 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 file