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
.
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
hashCode
public int hashCode()
- this uses the inefficient
Objects
implementation as the object count will be
relatively small and therefore efficiency is not a concern.
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object that)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.