|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.zib.scalaris.ScalarisVM
public class ScalarisVM
Provides methods to interact with a specific Scalaris (Erlang) VM.
Nested Class Summary | |
---|---|
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 Summary | |
---|---|
ScalarisVM(PeerNode node)
Creates a connection to the erlang VM of the given Scalaris node. |
|
ScalarisVM(String node)
Creates a connection to the erlang VM of the given Scalaris node. |
Method Summary | |
---|---|
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. |
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. |
List<String> |
getOtherVMs(int max)
Retrieves additional nodes from the Scalaris VM of the current connection for use by ConnectionFactory.addNode(String) . |
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. |
List<ErlangValue> |
killNodes(int number)
Kills the given number of nodes inside the Scalaris VM of the current connection. |
ScalarisVM.DeleteNodesByNameResult |
killNodes(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. |
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(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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScalarisVM(PeerNode node) throws ConnectionException
node
- Scalaris node to connect with
ConnectionException
- if the connection fails or the connection policy is not
cloneablepublic ScalarisVM(String node) throws ConnectionException
node
- Scalaris node to connect with
ConnectionException
- if the connection fails or the connection policy is not
cloneableMethod Detail |
---|
public 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 cookie
UnknownException
- 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 cookie
UnknownException
- 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 cookie
UnknownException
- if any other error occurspublic 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 cookie
UnknownException
- if any other error occurspublic ScalarisVM.AddNodesResult addNodes(int number) throws ConnectionException, UnknownException
number
- number of nodes to add
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 cookie
UnknownException
- if any other error occurspublic boolean shutdownNode(ErlangValue name) throws ConnectionException, UnknownException
name
- the name of a node
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 cookie
UnknownException
- if any other error occurspublic boolean killNode(ErlangValue name) throws ConnectionException, UnknownException
name
- the name of a node
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 cookie
UnknownException
- if any other error occurspublic List<ErlangValue> shutdownNodes(int number) throws ConnectionException, UnknownException
number
- number of nodes to shut down
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 cookie
UnknownException
- if any other error occurspublic List<ErlangValue> killNodes(int number) throws ConnectionException, UnknownException
number
- number of nodes to kill
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 cookie
UnknownException
- if any other error occurspublic ScalarisVM.DeleteNodesByNameResult shutdownNodesByName(List<ErlangValue> names) throws ConnectionException, UnknownException
names
- names of the nodes to shut down
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 cookie
UnknownException
- if any other error occurspublic ScalarisVM.DeleteNodesByNameResult killNodes(List<ErlangValue> names) throws ConnectionException, UnknownException
names
- names of the nodes to kill
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 cookie
UnknownException
- if any other error occurspublic List<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 cookie
UnknownException
- 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 cookie
UnknownException
- 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 cookie
UnknownException
- if any other error occurspublic void closeConnection()
ConnectionException
s!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |