public final class Pgx extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EMBEDDED_URL
constant indicating this URL refers to an embedded PGX instance.
|
Constructor and Description |
---|
Pgx() |
Modifier and Type | Method and Description |
---|---|
static Control |
createControl(String baseUrl)
Deprecated.
|
static PgxSession |
createSession(String source) |
static PgxSession |
createSession(String baseUrl, String source) |
static 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) |
static ServerInstance |
getInstance(String baseUrl)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(String baseUrl, int prefetchSize, int uploadBatchSize, int remoteFutureTimeout)
Get a handle to a PGX instance.
|
static void |
setDefaultUrl(String url)
set the default base url used by invocations of
getCore() . |
public static final String EMBEDDED_URL
@Deprecated public static Control createControl(String baseUrl)
public static PgxSession createSession(String source) throws ExecutionException, InterruptedException
public static PgxSession createSession(String baseUrl, String source) throws ExecutionException, InterruptedException
public static String getDefaultUrl()
EMBEDDED_URL
. You can overwrite the *default* default url by setting the -DpgxDefaultUrl system property.public static ServerInstance getInstance()
getDefaultUrl()
.ServerInstance
instancepublic static ServerInstance getInstance(ClientConfig config)
public static ServerInstance getInstance(String baseUrl)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxServerInstance
instancepublic static ServerInstance getInstance(String baseUrl, int prefetchSize, int uploadBatchSize, int remoteFutureTimeout)
baseUrl
- base url pointing to a PGX server instance, e.g. myhost:7000/pgxprefetchSize
- 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.ServerInstance
instanceCopyright © 2015. All rights reserved.