org.apache.whirr.service
Class ClusterActionHandler
java.lang.Object
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
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ClusterActionHandler
public ClusterActionHandler()
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.