![]() | ![]() | contents |
@Shutdown — Shuts down the database.
ClientResponse client.callProcedure("@Shutdown")
The @Shutdown system procedure performs an orderly shut down of a VoltDB database on all nodes of the cluster.
VoltDB is an in-memory database. By default, data is not saved when you shut down the database. If you want to save the data between sessions, you can enable command logging (Enterprise Edition only) or save a snapshot (either manually or using automated snapshots) before the shutdown. See Chapter 10, Command Logging and Recovery and Chapter 9, Saving & Restoring a VoltDB Database for more information.
Note that once the database shuts down, the client connection is lost and the calling program cannot make any further requests to the server.
The following example uses @Shutdown to stop the database cluster. Note the use of catch to separate out a VoltDB call procedure exception (which is expected) from any other exception.
try {
client.callProcedure("@Shutdown");
}
// we expect an exception when the connection drops.
catch (org.voltdb.client.ProcCallException e) {
System.out.println("Database shutdown initiated.");
}
// report any other exception.
catch (Exception e) {
e.printStackTrace();
}
The Tao of VoltDB
The 5 Principles of VoltDB
VoltDB Technosphere
Products and Solutions
Technical Support
Key Features
Download VoltDB
No Limits
VoltDB Application Gallery
Infinite Possibilities
VoltBuilder Program
