Package oracle.pg.rdbms
Class AdbGraphClient
java.lang.Object
oracle.pg.rdbms.AdbGraphClient
- All Implemented Interfaces:
AutoCloseable
ADB Graph Client. We recommend to close this
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ADB Graph Client. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this client object.doubleGets the available memory for environments to allocate.The configuration of this client.doubleGets the current environment's allocated memory.The endpoint used by this client.Fetches theEnvironmentStatusof the Autonomous Database.Gets the PGXServerInstanceobject of an attached environment which can be used to create a newPgxSessionfor in-memory graph analysis.booleanChecks if the Autonomous Database is currently attached to an environment.Starts re-attaching the Autonomous Database to a new environment.startEnvironment(int memory) Starts attaching the Autonomous Database to a new environment.Starts detaching the Autonomous Database from the current environment.
-
Constructor Details
-
AdbGraphClient
Creates a new ADB Graph Client.- Parameters:
config- the ADB Graph Client configuration.
-
-
Method Details
-
isAttached
public boolean isAttached()Checks if the Autonomous Database is currently attached to an environment.- Returns:
- true if the Autonomous Database is currently attached to an environment. False otherwise.
-
getEnvironmentStatus
Fetches theEnvironmentStatusof the Autonomous Database.- Returns:
- the
EnvironmentStatusof the Autonomous Database.
-
startEnvironment
Starts attaching the Autonomous Database to a new environment.- Parameters:
memory- the amount of system memory (in gigabytes) to allocate on the attached environment.- Returns:
- a
Jobwhich completes once attachment operation completes. - Throws:
IllegalStateException- if the Autonomous Database is currently not inEnvironmentStatus.DETACHEDstate
-
stopEnvironment
Starts detaching the Autonomous Database from the current environment. Note: all in-memory data will be lost- Returns:
- a
Jobwhich completes once detachment operation completes. - Throws:
IllegalStateException- if the Autonomous Database is currently not inEnvironmentStatus.ATTACHEDstate
-
restartEnvironment
Starts re-attaching the Autonomous Database to a new environment.- Returns:
- a
Jobwhich completes once re-attachment operation completes. - Throws:
IllegalStateException- if the Autonomous Database is currently not inEnvironmentStatus.ATTACHEDstate
-
getPgxInstance
Gets the PGXServerInstanceobject of an attached environment which can be used to create a newPgxSessionfor in-memory graph analysis.- Returns:
- the PGX
ServerInstanceof the Autonomous Database.
-
getCurrentMemory
public double getCurrentMemory()Gets the current environment's allocated memory. Only returns the memory if environment is in attached status.- Returns:
- the allocated memory for the currently attached environment. The results' units are in Gigabytes and in decimal format.
-
getAvailableMemory
public double getAvailableMemory()Gets the available memory for environments to allocate. Only returns the memory if environment is in detached status.- Returns:
- the available memory for the environments to allocate. The results' units are in Gigabytes and in decimal format.
-
close
public void close()Closes this client object.- Specified by:
closein interfaceAutoCloseable
-
getConfig
The configuration of this client.- Returns:
- the configuration of this client.
-
getEndpoint
The endpoint used by this client.- Returns:
- the endpoint.
-