|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.scale7.cassandra.pelops.Cluster
public class Cluster
A heavy thread safe object that maintains a list of nodes in the cluster. It's intended that one instance of the class be available in the JVM per cluster.
| Nested Class Summary | |
|---|---|
static class |
Cluster.AcceptAllNodeFilter
Default implementation that accepts all nodes. |
static interface |
Cluster.INodeFilter
A filter used to determine which nodes should be used when refreshing. |
static class |
Cluster.Node
Represents a node in the cluster. |
| Constructor Summary | |
|---|---|
Cluster(String[] nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery)
|
|
Cluster(String[] nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery,
Cluster.INodeFilter nodeFilter)
|
|
Cluster(String nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery)
|
|
Cluster(String nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery,
Cluster.INodeFilter nodeFilter)
|
|
Cluster(String nodes,
int thriftPort)
|
|
Cluster(String nodes,
int thriftPort,
boolean dynamicNodeDiscovery)
|
|
| Method Summary | |
|---|---|
IConnection.Config |
getConnectionConfig()
Configuration used to open new connections. |
Cluster.Node[] |
getNodes()
The current list of available nodes. |
void |
refresh()
Refresh the current list of nodes. |
void |
refresh(String keyspace)
Refresh the current list of nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cluster(String nodes,
int thriftPort)
public Cluster(String nodes,
int thriftPort,
boolean dynamicNodeDiscovery)
public Cluster(String nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery)
public Cluster(String[] nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery)
public Cluster(String[] nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery,
Cluster.INodeFilter nodeFilter)
public Cluster(String nodes,
IConnection.Config connectionConfig,
boolean dynamicNodeDiscovery,
Cluster.INodeFilter nodeFilter)
| Method Detail |
|---|
public IConnection.Config getConnectionConfig()
public Cluster.Node[] getNodes()
Note: avoid calling this method is a tight loop.
public void refresh(String keyspace)
keyspace - optional keyspace name used to obtain the node ringpublic void refresh()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||