Package org.voltdb
Class InProcessVoltDBServer
java.lang.Object
org.voltdb.InProcessVoltDBServer
Class used to run a single VoltDB server in-process for debug and test
 purposes.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionconfigPartitionCount(int partitionCount) Set the number of partitions the single VoltDB server will use.configPathToLicense(String path) When using enterprise or pro edition, specify a path to the license needed.org.voltdb.client.ClientCreate and connect a client to the in-process VoltDB server.voidHelper method for loading a row into a table.runDDLFromPath(String path) Run DDL from a file on disk.runDDLFromString(String ddl) Run DDL from a given string.voidshutdown()Stop the in-process server and block until it has completely stopped.start()Starts the in-process server and blocks until it is ready to accept connections.
- 
Constructor Details- 
InProcessVoltDBServerpublic InProcessVoltDBServer()Create an instance ready to start.
 
- 
- 
Method Details- 
configPartitionCountSet the number of partitions the single VoltDB server will use. The default is 8. Must be called beforestart().- Parameters:
- partitionCount- The number of partitions desired.
- Returns:
- InProcessVoltDBServer instance for chaining.
 
- 
configPathToLicenseWhen using enterprise or pro edition, specify a path to the license needed.- Parameters:
- path- Path to license. Must be called before- start().
- Returns:
- InProcessVoltDBServer instance for chaining.
 
- 
startStarts the in-process server and blocks until it is ready to accept connections.- Returns:
- InProcessVoltDBServer instance for chaining.
 
- 
runDDLFromPathRun DDL from a file on disk. Must be called afterstart().- Parameters:
- path- Path to DDL file.
- Returns:
- InProcessVoltDBServer instance for chaining.
 
- 
runDDLFromStringRun DDL from a given string. Must be called afterstart().- Parameters:
- ddl- String containing DDL to run.
- Returns:
- InProcessVoltDBServer instance for chaining.
 
- 
shutdownpublic void shutdown()Stop the in-process server and block until it has completely stopped. Obviously must be called afterstart().
- 
getClientCreate and connect a client to the in-process VoltDB server. Note, client will be automatically closed when the in-process server is shut down. Must be called afterstart().- Returns:
- Connected client.
- Throws:
- Exception- on failure to connect properly.
 
- 
loadRowHelper method for loading a row into a table. Must be called afterstart()and afterrunDDLFromPath(String)orrunDDLFromString(String).- Parameters:
- tableName- The case-insensitive name of the target table.
- row- An array of schema-compatible values comprising the row to load.
- Throws:
- Exception- if the server is unable to complete a transaction of if the input doesn't match table schema.
 
 
-