@InterfaceAudience.Private public class ActiveState extends HAState
NameNode.OperationCategory.WRITE
and
NameNode.OperationCategory.READ
.Constructor and Description |
---|
ActiveState() |
Modifier and Type | Method and Description |
---|---|
void |
checkOperation(HAContext context,
NameNode.OperationCategory op)
Check if an operation is supported in a given state.
|
void |
enterState(HAContext context)
Method to be overridden by subclasses to perform steps necessary for
entering a state.
|
void |
exitState(HAContext context)
Method to be overridden by subclasses to perform steps necessary for
exiting a state.
|
void |
setState(HAContext context,
HAState s)
Move from the existing state to a new state
|
boolean |
shouldPopulateReplQueues() |
getServiceState, prepareToEnterState, prepareToExitState, setStateInternal, toString
public void checkOperation(HAContext context, NameNode.OperationCategory op)
HAState
checkOperation
in class HAState
context
- HA contextop
- Type of the operation.public boolean shouldPopulateReplQueues()
shouldPopulateReplQueues
in class HAState
public void setState(HAContext context, HAState s) throws ServiceFailedException
HAState
setState
in class HAState
context
- HA contexts
- new stateServiceFailedException
- on failure to transition to new state.public void enterState(HAContext context) throws ServiceFailedException
HAState
enterState
in class HAState
context
- HA contextServiceFailedException
- on failure to enter the state.public void exitState(HAContext context) throws ServiceFailedException
HAState
exitState
in class HAState
context
- HA contextServiceFailedException
- on failure to enter the state.Copyright © 2013 Apache Software Foundation. All rights reserved.