public class ScalarisVM
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ScalarisVM.AddNodesResult |
Plain old data object for results of
addNodes(int). |
static class |
ScalarisVM.DeleteNodesByNameResult |
Plain old data object for results of
shutdownNodes(int), shutdownNodesByName(List),
killNodes(int) and killNodes(List). |
static class |
ScalarisVM.GetInfoResult |
Plain old data object for results of
getInfo(). |
| Constructor | Description |
|---|---|
ScalarisVM(PeerNode node) |
Creates a connection to the erlang VM of the given Scalaris node.
|
ScalarisVM(java.lang.String node) |
Creates a connection to the erlang VM of the given Scalaris node.
|
| Modifier and Type | Method | Description |
|---|---|---|
ScalarisVM.AddNodesResult |
addNodes(int number) |
Adds the given number of nodes to the Scalaris VM of the current connection.
|
void |
closeConnection() |
Closes the transaction's connection to a scalaris node.
|
ScalarisVM.GetInfoResult |
getInfo() |
Gets some information about the VM and Scalaris.
|
java.util.List<ErlangValue> |
getNodes() |
Gets the names of the nodes in the Scalaris VM of the current connection.
|
int |
getNumberOfNodes() |
Gets the number of nodes in the Scalaris VM of the current connection.
|
java.util.List<java.lang.String> |
getOtherVMs(int max) |
Retrieves additional nodes from the Scalaris VM of the current
connection for use by
ConnectionFactory.addNode(String). |
java.lang.String |
getVersion() |
Gets the version of the Scalaris VM of the current connection.
|
boolean |
killNode(ErlangValue name) |
Kills the given node inside the Scalaris VM of the current connection.
|
java.util.List<ErlangValue> |
killNodes(int number) |
Kills the given number of nodes inside the Scalaris VM of the current
connection.
|
ScalarisVM.DeleteNodesByNameResult |
killNodes(java.util.List<ErlangValue> names) |
Kills the given nodes inside the Scalaris VM of the current connection.
|
void |
killVM() |
Kills the Scalaris VM of the current connection.
|
boolean |
shutdownNode(ErlangValue name) |
Shuts down the given node (graceful leave) inside the Scalaris VM of the
current connection.
|
java.util.List<ErlangValue> |
shutdownNodes(int number) |
Shuts down the given number of nodes (graceful leave) inside the
Scalaris VM of the current connection.
|
ScalarisVM.DeleteNodesByNameResult |
shutdownNodesByName(java.util.List<ErlangValue> names) |
Shuts down the given nodes (graceful leave) inside the Scalaris VM of the
current connection.
|
void |
shutdownVM() |
Tells the Scalaris VM of the current connection to shut down gracefully.
|
public ScalarisVM(PeerNode node) throws ConnectionException
node - Scalaris node to connect withConnectionException - if the connection fails or the connection policy is not
cloneablepublic ScalarisVM(java.lang.String node)
throws ConnectionException
node - Scalaris node to connect withConnectionException - if the connection fails or the connection policy is not
cloneablepublic java.lang.String getVersion()
throws ConnectionException,
UnknownException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic ScalarisVM.GetInfoResult getInfo() throws ConnectionException, UnknownException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic int getNumberOfNodes()
throws ConnectionException,
UnknownException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic java.util.List<ErlangValue> getNodes() throws ConnectionException, UnknownException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic ScalarisVM.AddNodesResult addNodes(int number) throws ConnectionException, UnknownException
number - number of nodes to addConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic boolean shutdownNode(ErlangValue name) throws ConnectionException, UnknownException
name - the name of a nodeConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic boolean killNode(ErlangValue name) throws ConnectionException, UnknownException
name - the name of a nodeConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic java.util.List<ErlangValue> shutdownNodes(int number) throws ConnectionException, UnknownException
number - number of nodes to shut downConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic java.util.List<ErlangValue> killNodes(int number) throws ConnectionException, UnknownException
number - number of nodes to killConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic ScalarisVM.DeleteNodesByNameResult shutdownNodesByName(java.util.List<ErlangValue> names) throws ConnectionException, UnknownException
names - names of the nodes to shut downConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic ScalarisVM.DeleteNodesByNameResult killNodes(java.util.List<ErlangValue> names) throws ConnectionException, UnknownException
names - names of the nodes to killConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic java.util.List<java.lang.String> getOtherVMs(int max)
throws ConnectionException,
UnknownException
ConnectionFactory.addNode(String).max - maximum number of nodes to return (> 0)ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic void shutdownVM()
throws ConnectionException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic void killVM()
throws ConnectionException
ConnectionException - if the connection is not active or a communication error
occurs or an exit signal was received or the remote node
sends a message containing an invalid cookieUnknownException - if any other error occurspublic void closeConnection()
ConnectionExceptions!