public class ClientFactory
extends java.lang.Object
Client
interfaceConstructor and Description |
---|
ClientFactory() |
Modifier and Type | Method and Description |
---|---|
static Client |
createClient()
Create a
Client 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 a
Client . |
static void |
preserveResources()
Internally used by the VoltDB server during initialization.
|
public static Client createClient()
Client
with no connections and all default options.
Authentication will use a blank username and password.Client
public static Client createClient(ClientConfig config)
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.
config
- A ClientConfig
objectClient
public static Client2 createClient(Client2Config config)
Client2
.
This call takes a Client2Config
argument, which
distinguishes it from createClient(ClientConfig)
.
All client options, including authentication information, are
provided via the Client2Config
object.
config
- A Client2Config
objectClient2
public static void preserveResources()
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.