Package org.voltdb.client
Class ClientFactory
java.lang.Object
org.voltdb.client.ClientFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Client
Create aClient
with no connections and all default options.static Client2
createClient
(Client2Config config) Create a "version 2" client,Client2
.static Client
createClient
(ClientConfig config) Create a "version 1" client,Client
.static void
Internally used by the VoltDB server during initialization.
-
Constructor Details
-
ClientFactory
public ClientFactory()
-
-
Method Details
-
createClient
Create aClient
with no connections and all default options. Authentication will use a blank username and password.- Returns:
- Newly constructed
Client
-
createClient
Create a "version 1" client,Client
.Using a
ClientConfig
object ensures that a client application is isolated from changes to the configuration options. Authentication credentials are provided via the configuration object.- Parameters:
config
- AClientConfig
object- Returns:
- A configured
Client
-
createClient
Create a "version 2" client,Client2
.This call takes a
Client2Config
argument, which distinguishes it fromcreateClient(ClientConfig)
.All client options, including authentication information, are provided via the
Client2Config
object.- Parameters:
config
- AClient2Config
object- Returns:
- A configured
Client2
-
preserveResources
public static void preserveResources()Internally used by the VoltDB server during initialization.This method is intended to ensure that the resources needed to create clients are always initialized and won't be released when the active client count goes to zero.
-