11.3 Configuration Parameters for the Graph Client
You can configure the PGX graph client. All the parameters are available as command-line options also.
Table 11-3 Configuration Parameters for the Graph Client
Parameter | Type | Description | Default |
---|---|---|---|
access_token |
string |
The authentication token. | null |
base_url |
string |
The base url in the format host [ : port][ /path] of the PGX server REST end-point. If the base_url is null , the default will be used which points to embedded PGX instance.
|
null |
cctrace_out |
string |
[relevant for enable_cctrace] When cctrace is enabled, this option specifies a path to a file where cctrace should log to. If null it will use the default PGX logger on level TRACE. If it is the special value :stderr: it will log to stderr.
|
null |
cctrace_print_stacktraces |
boolean |
[relevant for enable_cctrace ] When cctrace is enabled, this flag prints the stacktrace for each request and result.
|
false |
client_server_interaction_mode |
enum[async_polling, blocking] |
If async_polling the PGX client would poll the status of the future until it is completed. If blocking , the PGX client would send a request to directly get the value of the future and the server would block until the future result is ready.
|
async_polling |
enable_cctrace |
boolean |
If true log every call to a Control or Core interface.
|
false |
keystore |
string |
The path to the keystore to use for client connections. The keystore is used to authenticate this client at the PGX server if two-way SSL/TLS is enabled. | null |
max_client_http_connections |
integer |
Maximum number of connections to open to the PGX server. | 2 |
password |
string |
Keystore password only. | null |
prefetch_size |
integer |
Number of items to be prefetched in remote iterators. | 2048 |
realm_client_config |
object |
Implementation dependent configuration options for the realm client. | null |
remote_future_pending_retry_interval |
integer |
Number of milliseconds to wait before sending another request in case a GET request for a PgxRemoteFuture receives a 202 - Accepted response.
|
500 |
remote_future_timeout |
integer |
Time that a GET request for a PgxRemoteFuture will be alive, until it times out and tries again. Time in milliseconds, set it to zero for an infinite timeout. See HTTP Client SO_TIMEOUT for more details.
|
300000 |
tls_version |
string |
TLS version to be used by the client. For example, TLSv1.2 .
|
tlsv1.2 |
truststore |
string |
Path to the truststore to use for client connections. The truststore is used to validate the server certificate if communicating over SSL/TLS. | null |
upload_batch_size |
integer |
Number of items to be uploaded in a batch. This is used in Core#addAllToCollection() and Core#setProperty() .
|
65536 |
username |
string |
Name of the user. | null |
Example 11-3 Configure the Graph Client Using the Graph PGX Shell
This following is an example to configure the graph client:
cd /opt/oracle/graph ./bin/opg-jshell --base_url https://myhost:8080/pgx --username scott --prefetch_size 1024 --upload_batch_size 5000 --remote_future_timeout 20000 --pending_retry_interval 800
Example 11-4 Configure the Graph Client Using the Java API
The following is an example to configure the graph client programatically using the Pgx.getInstance
methods:
public static ServerInstance getInstance(String baseUrl, String username, String password, Integer prefetchSize,
Integer uploadBatchSize, Integer remoteFutureTimeout, Integer remoteFuturePendingRetryInterval)
To specify key store and trust store for SSL connections use the standard JDK system properties:
System.setProperty("javax.net.ssl.trustStore","<truststore>");
System.setProperty("javax.net.ssl.keyStore","<keystore>");
System.setProperty("javax.net.ssl.keyStorePassword","<password>");
Parent topic: Configuring the In-Memory Graph Server (PGX)