All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brooklyn.extras.whirr.core.WhirrCluster Maven / Gradle / Ivy

package brooklyn.extras.whirr.core;

import java.util.Collection;

import org.apache.whirr.Cluster;
import org.apache.whirr.ClusterController;
import org.apache.whirr.ClusterSpec;

import brooklyn.entity.Entity;
import brooklyn.entity.proxying.ImplementedBy;
import brooklyn.entity.trait.Startable;
import brooklyn.event.basic.BasicAttributeSensor;
import brooklyn.event.basic.BasicConfigKey;
import brooklyn.location.Location;
import brooklyn.util.flags.SetFromFlag;

import com.google.common.annotations.Beta;
import com.google.common.annotations.VisibleForTesting;

/**
 * Generic entity that can be used to deploy clusters that are
 * managed by Apache Whirr.
 *
 */
@ImplementedBy(WhirrClusterImpl.class)
public interface WhirrCluster extends Entity, Startable {

    @SetFromFlag("recipe")
    public static final BasicConfigKey RECIPE = new BasicConfigKey(
            String.class, "whirr.recipe", "Apache Whirr cluster recipe");

    public static final BasicAttributeSensor CLUSTER_NAME = new BasicAttributeSensor(
            String.class, "whirr.cluster.name", "Name of the Whirr cluster");

    /**
     * Apache Whirr can only start and manage a cluster in a single location
     *
     * @param locations
     */
    @Override
    void start(Collection locations);

    @Beta
    public ClusterSpec getClusterSpec();

    @Beta
    public Cluster getCluster();

    @Beta
    @VisibleForTesting
    public ClusterController getController();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy