public abstract class ConfigurationAware extends java.lang.Object implements org.springframework.context.ApplicationListener<ConfigurationModifiedEvent>, ExecutionProcessor
Configuration
changes in order to update state.Modifier and Type | Field and Description |
---|---|
protected java.util.logging.Logger |
LOG |
Constructor and Description |
---|
ConfigurationAware() |
Modifier and Type | Method and Description |
---|---|
void |
afterReturningInvocation(ParseResult invocationContext,
java.lang.Object result) |
void |
afterThrowingInvocation(ParseResult invocationContext,
java.lang.Throwable thrown) |
ParseResult |
beforeInvocation(ParseResult invocationContext) |
protected abstract boolean |
configurationChanged()
Called before invoking a command in case the configuration changed.
|
protected java.lang.String |
failedComponentName() |
org.apache.hadoop.conf.Configuration |
getHadoopConfiguration()
Gets the hadoop configuration.
|
protected void |
logUpdateError(java.lang.Exception ex) |
void |
onApplicationEvent(ConfigurationModifiedEvent event) |
public void onApplicationEvent(ConfigurationModifiedEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<ConfigurationModifiedEvent>
public ParseResult beforeInvocation(ParseResult invocationContext)
beforeInvocation
in interface ExecutionProcessor
protected abstract boolean configurationChanged() throws java.lang.Exception
failedComponentName()
to provide
proper error messages.java.lang.Exception
- ignored and causing the re-initialization to occur on the next callfailedComponentName()
,
logUpdateError(Exception)
protected void logUpdateError(java.lang.Exception ex)
protected java.lang.String failedComponentName()
public void afterReturningInvocation(ParseResult invocationContext, java.lang.Object result)
afterReturningInvocation
in interface ExecutionProcessor
public void afterThrowingInvocation(ParseResult invocationContext, java.lang.Throwable thrown)
afterThrowingInvocation
in interface ExecutionProcessor
public org.apache.hadoop.conf.Configuration getHadoopConfiguration()