Skip to content

Commit 2355c54

Browse files
committed
Rename internal class
1 parent 531925f commit 2355c54

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/main/java/org/apache/commons/lang3/concurrent/EventCountCircuitBreaker.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public CheckIntervalData increment(final int delta) {
196196
* circuit breaker. Having this logic extracted into special classes avoids complex
197197
* if-then-else cascades.
198198
*/
199-
private abstract static class StateStrategy {
199+
private abstract static class AbstractStateStrategy {
200200
/**
201201
* Obtains the check interval to applied for the represented state from the given
202202
* {@link CircuitBreaker}.
@@ -234,9 +234,9 @@ public abstract boolean isStateTransition(EventCountCircuitBreaker breaker,
234234
}
235235

236236
/**
237-
* A specialized {@link StateStrategy} implementation for the state closed.
237+
* A specialized {@link AbstractStateStrategy} implementation for the state closed.
238238
*/
239-
private static final class StateStrategyClosed extends StateStrategy {
239+
private static final class StateStrategyClosed extends AbstractStateStrategy {
240240

241241
/**
242242
* {@inheritDoc}
@@ -257,9 +257,9 @@ public boolean isStateTransition(final EventCountCircuitBreaker breaker,
257257
}
258258

259259
/**
260-
* A specialized {@link StateStrategy} implementation for the state open.
260+
* A specialized {@link AbstractStateStrategy} implementation for the state open.
261261
*/
262-
private static final class StateStrategyOpen extends StateStrategy {
262+
private static final class StateStrategyOpen extends AbstractStateStrategy {
263263
/**
264264
* {@inheritDoc}
265265
*/
@@ -281,29 +281,29 @@ public boolean isStateTransition(final EventCountCircuitBreaker breaker,
281281
}
282282

283283
/** A map for accessing the strategy objects for the different states. */
284-
private static final Map<State, StateStrategy> STRATEGY_MAP = createStrategyMap();
284+
private static final Map<State, AbstractStateStrategy> STRATEGY_MAP = createStrategyMap();
285285

286286
/**
287287
* Creates the map with strategy objects. It allows access for a strategy for a given
288288
* state.
289289
*
290290
* @return the strategy map
291291
*/
292-
private static Map<State, StateStrategy> createStrategyMap() {
293-
final Map<State, StateStrategy> map = new EnumMap<>(State.class);
292+
private static Map<State, AbstractStateStrategy> createStrategyMap() {
293+
final Map<State, AbstractStateStrategy> map = new EnumMap<>(State.class);
294294
map.put(State.CLOSED, new StateStrategyClosed());
295295
map.put(State.OPEN, new StateStrategyOpen());
296296
return map;
297297
}
298298

299299
/**
300-
* Returns the {@link StateStrategy} object responsible for the given state.
300+
* Returns the {@link AbstractStateStrategy} object responsible for the given state.
301301
*
302302
* @param state the state
303-
* @return the corresponding {@link StateStrategy}
303+
* @return the corresponding {@link AbstractStateStrategy}
304304
* @throws CircuitBreakingException if the strategy cannot be resolved
305305
*/
306-
private static StateStrategy stateStrategy(final State state) {
306+
private static AbstractStateStrategy stateStrategy(final State state) {
307307
return STRATEGY_MAP.get(state);
308308
}
309309

0 commit comments

Comments
 (0)