public class UpdateClasses
extends java.lang.Object
Each such method is a convenience method that is equivalent to reading
a jarfile, containing classes to be added/updated, into a byte array,
then using the client API to execute a call to the @UpdateClasses
system procedure. Classes can be removed from the database by
giving their names in a separate argument.
Constructor and Description |
---|
UpdateClasses() |
Modifier and Type | Method and Description |
---|---|
static ClientResponse |
update(Client client,
java.io.File jarPath,
java.lang.String classesToDelete)
Synchronously updates class definitions.
|
static boolean |
update(Client client,
ProcedureCallback callback,
java.io.File jarPath,
java.lang.String classesToDelete)
Asynchronously updates class definitions.
|
static java.util.concurrent.CompletableFuture<ClientResponse> |
updateAsync(Client2 client,
java.io.File jarPath,
java.lang.String classesToDelete)
Asynchronously updates class definitions via a "version 2" client.
|
static ClientResponse |
updateSync(Client2 client,
java.io.File jarPath,
java.lang.String classesToDelete)
Synchronously updates class definitions via a "version 2" client.
|
public static ClientResponse update(Client client, java.io.File jarPath, java.lang.String classesToDelete) throws java.io.IOException, ProcCallException
ProcCallException
is thrown if the
response is anything other than success.client
- A connected Client
.jarPath
- Path to the jar file containing new/updated classes.classesToDelete
- comma-separated list of classes to delete.ClientResponse
instance of procedure call result.java.io.IOException
- If the file cannot be serialized or if there is a Java network error.ProcCallException
- on any VoltDB-specific failure.public static boolean update(Client client, ProcedureCallback callback, java.io.File jarPath, java.lang.String classesToDelete) throws java.io.IOException
client
- A connected Client
.callback
- The ProcedureCallback
that will be invoked with the result.jarPath
- Path to the jar file containing new/updated classes.classesToDelete
- comma-separated list of classes to delete.true
if the procedure was queued and false
otherwise.java.io.IOException
- If the file cannot be serialized or if there is a Java network error.public static ClientResponse updateSync(Client2 client, java.io.File jarPath, java.lang.String classesToDelete) throws java.io.IOException, ProcCallException
ProcCallException
is thrown if the response is anything other than success.client
- A connected Client2
.jarPath
- Path to the jar file containing new/updated classes.classesToDelete
- comma-separated list of classes to delete.ClientResponse
instance of procedure call result.java.io.IOException
- If the file cannot be serialized or if there is a Java network error.ProcCallException
- on any VoltDB-specific failure.public static java.util.concurrent.CompletableFuture<ClientResponse> updateAsync(Client2 client, java.io.File jarPath, java.lang.String classesToDelete) throws java.io.IOException
CompletableFuture
.client
- A connected Client2
.jarPath
- Path to the jar file containing new/updated classes.classesToDelete
- comma-separated list of classes to delete.CompletableFuture
that completes when the procedure call completes.java.io.IOException
- If the file cannot be serialized.