Package org.voltdb.client
Class ClientFactory
java.lang.Object
org.voltdb.client.ClientFactory
Factory for constructing instances of the
Client
interface-
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) Recommended method for creating aClient
.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
Recommended method for creating aClient
.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.
-