Package org.voltdb.client
Class ClientFactory
java.lang.Object
org.voltdb.client.ClientFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientCreate aClientwith no connections and all default options.static Client2createClient(Client2Config config) Create a "version 2" client,Client2.static ClientcreateClient(ClientConfig config) Create a "version 1" client,Client.static voidInternally used by the VoltDB server during initialization.
-
Constructor Details
-
ClientFactory
public ClientFactory()
-
-
Method Details
-
createClient
Create aClientwith 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
ClientConfigobject ensures that a client application is isolated from changes to the configuration options. Authentication credentials are provided via the configuration object.- Parameters:
config- AClientConfigobject- Returns:
- A configured
Client
-
createClient
Create a "version 2" client,Client2.This call takes a
Client2Configargument, which distinguishes it fromcreateClient(ClientConfig).All client options, including authentication information, are provided via the
Client2Configobject.- Parameters:
config- AClient2Configobject- 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.
-