org.apache.whirr.service
Class ClusterActionHandler

java.lang.Object
  extended by org.apache.whirr.service.ClusterActionHandler
Direct Known Subclasses:
ClusterActionHandlerSupport

public abstract class ClusterActionHandler
extends Object

A callback interface for cluster actions that apply to instances in a given role.

Implementation note. ClusterActionHandler implementations are discovered using a Service Provider Interface (SPI), described in ServiceLoader.


Field Summary
static String BOOTSTRAP_ACTION
           
static String CONFIGURE_ACTION
           
static String DESTROY_ACTION
           
 
Constructor Summary
ClusterActionHandler()
           
 
Method Summary
 void afterAction(ClusterActionEvent event)
          Called after the action has been performed.
 void beforeAction(ClusterActionEvent event)
          Called before the action is performed, giving the implementation an opportunity to specify scripts that should be run as a part of this action.
abstract  String getRole()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOTSTRAP_ACTION

public static final String BOOTSTRAP_ACTION
See Also:
Constant Field Values

CONFIGURE_ACTION

public static final String CONFIGURE_ACTION
See Also:
Constant Field Values

DESTROY_ACTION

public static final String DESTROY_ACTION
See Also:
Constant Field Values
Constructor Detail

ClusterActionHandler

public ClusterActionHandler()
Method Detail

getRole

public abstract String getRole()

beforeAction

public void beforeAction(ClusterActionEvent event)
                  throws IOException,
                         InterruptedException
Called before the action is performed, giving the implementation an opportunity to specify scripts that should be run as a part of this action.

Parameters:
event -
Throws:
IOException
InterruptedException

afterAction

public void afterAction(ClusterActionEvent event)
                 throws IOException,
                        InterruptedException
Called after the action has been performed.

Parameters:
event -
Throws:
IOException
InterruptedException


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.