public class InProcessVoltDBServer
extends java.lang.Object
Constructor and Description |
---|
InProcessVoltDBServer()
Create an instance ready to start.
|
Modifier and Type | Method and Description |
---|---|
InProcessVoltDBServer |
configPartitionCount(int partitionCount)
Set the number of partitions the single VoltDB server will use.
|
InProcessVoltDBServer |
configPathToLicense(java.lang.String path)
When using enterprise or pro edition, specify a path to the license needed.
|
InProcessVoltDBServer |
configureHttpPort(int port)
Override HTTP port.
|
org.voltdb.client.Client |
getClient()
Create and connect a client to the in-process VoltDB server.
|
void |
loadRow(java.lang.String tableName,
java.lang.Object... row)
Helper method for loading a row into a table.
|
InProcessVoltDBServer |
runDDLFromPath(java.lang.String path)
Run DDL from a file on disk (integrally uses in-process sqlcommand).
|
InProcessVoltDBServer |
runDDLFromString(java.lang.String ddl)
Run DDL from a given string (integrally uses in-process sqlcommand).
|
void |
shutdown()
Stop the in-process server and block until it has completely stopped.
|
InProcessVoltDBServer |
start()
Starts the in-process server and blocks until it is ready to accept
connections.
|
public InProcessVoltDBServer()
public InProcessVoltDBServer configPartitionCount(int partitionCount)
start()
.partitionCount
- The number of partitions desired.public InProcessVoltDBServer configureHttpPort(int port)
port
- http port to use.public InProcessVoltDBServer configPathToLicense(java.lang.String path)
path
- Path to license. Must be called before start()
.public InProcessVoltDBServer start()
public InProcessVoltDBServer runDDLFromPath(java.lang.String path)
start()
.path
- Path to DDL file.public InProcessVoltDBServer runDDLFromString(java.lang.String ddl)
start()
.ddl
- String containing DDL to run.public void shutdown()
start()
.public org.voltdb.client.Client getClient() throws java.lang.Exception
start()
.java.lang.Exception
- on failure to connect properly.public void loadRow(java.lang.String tableName, java.lang.Object... row) throws java.lang.Exception
start()
and after runDDLFromPath(String)
or runDDLFromString(String)
.tableName
- The case-insensitive name of the target table.row
- An array of schema-compatible values comprising the row to load.java.lang.Exception
- if the server is unable to complete a transaction of if the input doesn't match table schema.