public final class Pgx
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EMBEDDED_URL
constant indicating this URL refers to an embedded PGX instance.
|
Constructor and Description |
---|
Pgx() |
Modifier and Type | Method and Description |
---|---|
static PgxSession |
createSession(java.lang.String source)
Creates a session on the default instance.
|
static PgxSession |
createSession(java.lang.String baseUrl, java.lang.String source)
Creates a session.
|
static java.lang.String |
getDefaultUrl()
The default url is set by default to
EMBEDDED_URL . |
static ServerInstance |
getInstance()
Get a handle to a PGX instance using
getDefaultUrl() . |
static ServerInstance |
getInstance(ClientConfig config)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password, java.lang.Integer prefetchSize, java.lang.Integer uploadBatchSize, java.lang.Integer remoteFutureTimeout, java.lang.Integer remoteFuturePendingRetryInterval)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password, java.lang.Integer prefetchSize, java.lang.Integer uploadBatchSize, java.lang.Integer remoteFutureTimeout, java.lang.Integer remoteFuturePendingRetryInterval, java.lang.Boolean enableCcTrace)
Get a handle to a PGX instance.
|
static oracle.pgx.api.internal.ApiProvider |
getProviderFor(java.lang.String url) |
static void |
setDefaultUrl(java.lang.String url)
set the default base url used by invocations of
getInstance() . |
public static final java.lang.String EMBEDDED_URL
public static PgxSession createSession(java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
createSession(String, String)
using getDefaultUrl()
as base URL.source
- the session source stringjava.util.concurrent.ExecutionException
java.lang.InterruptedException
public static PgxSession createSession(java.lang.String baseUrl, java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
baseUrl
- the base URL pointing to a PGX server instance the session should be created onsource
- the session source stringjava.util.concurrent.ExecutionException
java.lang.InterruptedException
public static java.lang.String getDefaultUrl()
EMBEDDED_URL
. You can overwrite the *default* default url by setting the -DpgxDefaultUrl system property.public static ServerInstance getInstance() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getDefaultUrl()
.ServerInstance
instancejava.util.concurrent.ExecutionException
java.lang.InterruptedException
public static ServerInstance getInstance(ClientConfig config)
config
- the config identifying the instanceServerInstance
instancepublic static ServerInstance getInstance(java.lang.String baseUrl)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxServerInstance
instancepublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxusername
- the HTTP Basic Auth usernamepassword
- the HTTP Basic Auth passwordServerInstance
instancepublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password, java.lang.Integer prefetchSize, java.lang.Integer uploadBatchSize, java.lang.Integer remoteFutureTimeout, java.lang.Integer remoteFuturePendingRetryInterval)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxusername
- the HTTP Basic Auth usernamepassword
- the HTTP Basic Auth passwordprefetchSize
- how many elements to pre-fetch from the server, e.g. when iterating over a collectionuploadBatchSize
- how many elements to upload during one batch, e.g. when adding elements to a collectionremoteFutureTimeout
- How long GET requests waiting for futures to complete will be alive before time out. Time in milliseconds, set to zero for an infinite timeout. See HTTP Client SO_TIMEOUT
for more details.remoteFuturePendingRetryInterval
- How many milliseconds to wait before sending another request in case a GET
request for a PgxRemoteFuture
receives a 202 - Accepted responseServerInstance
instancepublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String username, java.lang.String password, java.lang.Integer prefetchSize, java.lang.Integer uploadBatchSize, java.lang.Integer remoteFutureTimeout, java.lang.Integer remoteFuturePendingRetryInterval, java.lang.Boolean enableCcTrace)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxusername
- the HTTP Basic Auth usernamepassword
- the HTTP Basic Auth passwordprefetchSize
- how many elements to pre-fetch from the server, e.g. when iterating over a collectionuploadBatchSize
- how many elements to upload during one batch, e.g. when adding elements to a collectionremoteFutureTimeout
- How long GET requests waiting for futures to complete will be alive before time out. Time in milliseconds, set to zero for an infinite timeout. See HTTP Client SO_TIMEOUT
for more details.remoteFuturePendingRetryInterval
- How many milliseconds to wait before sending another request in case a GET
request for a PgxRemoteFuture
receives a 202 - Accepted responseenableCcTrace
- if true
log every call to a Control or Core interfaceServerInstance
instancepublic static oracle.pgx.api.internal.ApiProvider getProviderFor(java.lang.String url)
public static void setDefaultUrl(java.lang.String url)
getInstance()
. The new default url affects sub-sequent calls of getInstance()
.url
- default urlCopyright © 2017 Oracle Corp. All Rights Reserved.