public final class ConnectionConfiguration extends AbstractConnectionConfiguration<Connection> implements Copyable<ConnectionConfiguration>
| Modifier and Type | Field and Description |
|---|---|
static Option<Integer> |
CLIENT_BUFFER_SIZE |
static Option<String> |
DATABASE |
static Option<Boolean> |
OPTIMIZE_MIXED_UPDATES |
static Option<Boolean> |
REASONING_ENABLED |
static Option<UUID> |
TX |
mOptionParser, mOptionsCREDENTIALS, KRB5_REVERSE_DNS, PASSWORD, SERVER, USERNAME| Modifier | Constructor and Description |
|---|---|
protected |
ConnectionConfiguration() |
protected |
ConnectionConfiguration(Options theOptions) |
| Modifier and Type | Method and Description |
|---|---|
static Connection |
at(String theConnectionString)
Open a connection to the database specified directly by the connection string which may contain connection options
|
Connection |
connect()
Create a connection object to the database as described by this configuration.
|
ConnectionConfiguration |
copy()
Create a deep copy of the object which does not share any references with the original.
|
ConnectionConfiguration |
credentials(ConnectionCredentials theConnectionCredentials)
Specify the credentials that should be used to authenticate to the database.
|
ConnectionConfiguration |
credentials(String theUsername,
String thePassword)
Specify the username and password that should be used to authenticate to the database.
|
ConnectionConfiguration |
database(String theDB)
Specify the name of the db you want to connect to
|
static ConnectionConfiguration |
from(String theConnectionString)
Create a SNARLConnectionConfiguration based on the full connection string.
|
<V> V |
get(Option<V> theOption)
Return the value of the provide connection configuration option
|
ConnectionConfiguration |
reasoning(boolean theReasoningFlag)
Specify whether you would like the connection to utilize reasoning
|
ConnectionConfiguration |
server(String theServerURL)
Specify the URL of the database server.
|
static ConnectionConfiguration |
to(String theDBName)
Create a new configuration object for connecting to the Stardog database with the provided name
|
ConnectionConfiguration |
with(Options theOptions)
Use the given options as parameters to the connection
|
getOptions, set, setAllprotected ConnectionConfiguration()
protected ConnectionConfiguration(Options theOptions)
public ConnectionConfiguration copy()
copy in interface Copyable<ConnectionConfiguration>public ConnectionConfiguration credentials(String theUsername, String thePassword)
credentials in interface LoginConnectionConfiguration<Connection>credentials in class AbstractConnectionConfiguration<Connection>theUsername - the usernamethePassword - the passwordpublic ConnectionConfiguration credentials(ConnectionCredentials theConnectionCredentials)
credentials in interface LoginConnectionConfiguration<Connection>credentials in class AbstractConnectionConfiguration<Connection>theConnectionCredentials - the credentialspublic ConnectionConfiguration server(String theServerURL)
server in interface LoginConnectionConfiguration<Connection>server in class AbstractConnectionConfiguration<Connection>theServerURL - the server urlpublic ConnectionConfiguration reasoning(boolean theReasoningFlag)
theReasoningFlag - the reasoning flagpublic ConnectionConfiguration database(String theDB)
theDB - the name of the databasepublic ConnectionConfiguration with(Options theOptions)
theOptions - the connection optionspublic <V> V get(Option<V> theOption)
V - the option typetheOption - the valuepublic Connection connect() throws StardogException
Connection is used.connect in interface LoginConnectionConfiguration<Connection>StardogException - if there was an error while opening the connectionpublic static Connection at(String theConnectionString) throws StardogException
theConnectionString - the connection stringStardogException - if there is an error connecting to the specified repositorypublic static ConnectionConfiguration from(String theConnectionString)
connection pool.theConnectionString - the connection stringpublic static ConnectionConfiguration to(String theDBName)
theDBName - the nameCopyright © 2010-2016 Stardog Union. All Rights Reserved.