|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.zib.scalaris.Scalaris
public class Scalaris
Provides methods to interact with some Scalaris (Erlang) VM.
Instances of this class can be generated using a given connection to a
scalaris node (Scalaris(Connection)
) or without a
connection (Scalaris()
) in which case a new connection
is created using ConnectionFactory.createConnection()
.
Constructor Summary | |
---|---|
Scalaris()
Constructor, uses the default connection returned by ConnectionFactory.createConnection() . |
|
Scalaris(Connection conn)
Constructor, uses the given connection to an erlang node. |
Method Summary | |
---|---|
void |
closeConnection()
Closes the transaction's connection to a scalaris node. |
List<String> |
getRandomNodes(int max)
Retrieves random nodes from Scalaris for use by ConnectionFactory.addNode(String) or ScalarisVM . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scalaris() throws ConnectionException
ConnectionFactory.createConnection()
.
ConnectionException
- if the connection failspublic Scalaris(Connection conn)
conn
- connection to use for the transactionMethod Detail |
---|
public List<String> getRandomNodes(int max) throws ConnectionException, UnknownException
ConnectionFactory.addNode(String)
or ScalarisVM
.
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 closeConnection()
ConnectionException
s!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |