brooklyn.entity.nosql.cassandra.CassandraCluster Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-software-nosql Show documentation
Show all versions of brooklyn-software-nosql Show documentation
Brooklyn entities for NoSQL data store software entities
/*
* Copyright 2012-2013 by Cloudsoft Corp.
*/
package brooklyn.entity.nosql.cassandra;
import brooklyn.catalog.Catalog;
import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.Description;
import brooklyn.entity.basic.MethodEffector;
import brooklyn.entity.group.DynamicCluster;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.event.AttributeSensor;
import brooklyn.event.basic.BasicAttributeSensor;
import brooklyn.event.basic.BasicAttributeSensorAndConfigKey;
import brooklyn.event.basic.BasicConfigKey;
import brooklyn.util.flags.SetFromFlag;
/**
* A cluster of {@link CassandraNode}s based on {@link DynamicCluster} which can be resized by a policy if required.
*
* TODO add sensors with aggregated Cassandra statistics from cluster
*/
@Catalog(name="Apache Cassandra Database Cluster", description="Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store which provides a ColumnFamily-based data model richer than typical key/value systems", iconUrl="classpath:///cassandra-logo.jpeg")
@ImplementedBy(CassandraClusterImpl.class)
public interface CassandraCluster extends DynamicCluster {
@SetFromFlag("clusterName")
BasicAttributeSensorAndConfigKey CLUSTER_NAME = new BasicAttributeSensorAndConfigKey(String.class, "cassandra.cluster.name", "Name of the Cassandra cluster", "BrooklynCluster");
ConfigKey SEEDS = new BasicConfigKey(String.class, "cassandra.cluster.seeds", "List of seed node hosts in cluster");
AttributeSensor HOSTNAME = new BasicAttributeSensor(String.class, "cassandra.cluster.hostname", "Hostname to connect to cluster with");
AttributeSensor THRIFT_PORT = new BasicAttributeSensor(Integer.class, "cassandra.cluster.thrift.port", "Cassandra Thrift RPC port to connect to cluster with");
MethodEffector UPDATE = new MethodEffector(CassandraCluster.class, "update");
/**
* The name of the cluster.
*/
String getClusterName();
@Description("Updates the cluster members")
void update();
}