Class ServerInstance


  • public class ServerInstance
    extends oracle.pgx.api.internal.ApiObject
    A PGX server instance.
    • 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.
      • 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 client
        idleTimeout - if not null, tries to overwrite server default idle timeout
        taskTimeout - if not null, tries to overwrite server default task timeout
        unit - 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 by SessionContext.
        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 this ServerInstance. Note depending on the RealmClient implementation used, this might not be supported or have no effect.
        Parameters:
        token - the new auth token
      • getPgxUsernameAsync

        public PgxFuture<java.lang.String> getPgxUsernameAsync()
        Get the name of the current user. Returns null 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. Returns null 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. Returns null 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 id
        idleTimeout - the new idle timeout value
        unit - 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
        Parameters:
        sessionId - the session id
        idleTimeout - the new idle timeout value
        unit - 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getVersion

        public oracle.pgx.common.VersionInfo getVersion()
                                                 throws java.util.concurrent.ExecutionException,
                                                        java.lang.InterruptedException
        Blocking version of getVersionAsync(). Calls getVersionAsync() and waits for the returned PgxFuture 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 of createSessionAsync(String). Calls createSessionAsync(String) and waits for the returned PgxFuture 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 of getSessionAsync(String). Calls getSessionAsync(String) and waits for the returned PgxFuture 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 of getSessionAsync(SessionContext). Calls getSessionAsync(SessionContext) and waits for the returned PgxFuture 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 of createSessionAsync(String). Calls createSessionAsync(String) and waits for the returned PgxFuture 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 of getPgxConfigAsync(). Calls getPgxConfigAsync() and waits for the returned PgxFuture 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 of getPgxConfigObjectAsync(). Calls getPgxConfigObjectAsync() and waits for returned PgxFuture 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 of startEngineAsync(String). Calls startEngineAsync(String) and waits for the returned PgxFuture 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 of isEngineRunningAsync(). Calls isEngineRunningAsync() and waits for returned PgxFuture 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 of isEngineReadyAsync(). Calls isEngineReadyAsync() and waits for the returned PgxFuture 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 of isGraphPreloadingDoneAsync(). Calls isGraphPreloadingDoneAsync() and waits for returned PgxFuture 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 of shutdownEngineAsync(long, TimeUnit). Calls shutdownEngineAsync(long, TimeUnit) and waits for the returned PgxFuture 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 of shutdownEngineNowAsync(). Calls shutdownEngineNowAsync() and waits for returned PgxFuture 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 of shutdownEngineNowIfRunningAsync(). Calls shutdownEngineNowIfRunningAsync() and waits for the returned PgxFuture 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 of getServerStateAsync(). Calls getServerStateAsync() and waits for the returned PgxFuture 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 of freeCachedMemoryAsync(). Calls freeCachedMemoryAsync() and waits for the returned PgxFuture 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 of freeCachedMemoryAsync(double). Calls freeCachedMemoryAsync(double) and waits for the returned PgxFuture 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 of killSessionAsync(String). Calls killSessionAsync(String) and waits for the returned PgxFuture 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 of startEngineAsync(). Calls startEngineAsync() and waits for the returned PgxFuture 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 of startEngineAsync(Map). Calls startEngineAsync(Map) and waits for the returned PgxFuture 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 of startEngineAsync(InputStream). Calls startEngineAsync(InputStream) and waits for returned PgxFuture 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 of startEngineAsync(PgxConfig). Calls startEngineAsync(PgxConfig) and waits for returned PgxFuture 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 of updatePgxConfigAsync(PgxConfig). Calls updatePgxConfigAsync(PgxConfig) and waits for returned PgxFuture 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.util.Map<PgxConfig.Field,​java.lang.Object> config)
                             throws java.util.concurrent.ExecutionException,
                                    java.lang.InterruptedException
        Blocking version of updatePgxConfigAsync(Map). Calls updatePgxConfigAsync(Map) and waits for returned PgxFuture 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 of updatePgxConfigAsync(InputStream). Calls updatePgxConfigAsync(InputStream) and waits for returned PgxFuture 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 of updatePgxConfigAsync(String). Calls updatePgxConfigAsync(String) and waits for returned PgxFuture 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 limit
        size - memory limit to be set relative to the provided MemoryUnit
        unit - 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