added distribution task to client buildscript
This commit is contained in:
@@ -54,14 +54,13 @@ public abstract class Context<S extends State<S,C>, C extends Context<S,C>> {
|
||||
* @see State#onEnter(Context)
|
||||
* @see #handleError(Throwable)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void transition(@NotNull S state) {
|
||||
lock.lock();
|
||||
try {
|
||||
//noinspection unchecked
|
||||
this.state.onExit((C) this);
|
||||
onTransition(this.state, state);
|
||||
this.state = state;
|
||||
//noinspection unchecked
|
||||
state.onEnter((C) this).ifPresent(this::transition);
|
||||
} catch (Throwable t) {
|
||||
handleError(t);
|
||||
|
@@ -15,12 +15,12 @@ public abstract class TimeoutContext<S extends TimeoutState<S,C>, C extends Time
|
||||
super(initialState);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void timeout(@NotNull S currentState, long delay) {
|
||||
scheduler.schedule(() -> {
|
||||
if (Objects.equals(getState(), currentState)) {
|
||||
execute(() -> {
|
||||
if (Objects.equals(getState(), currentState)) {
|
||||
//noinspection unchecked
|
||||
return currentState.onTimeout((C) this);
|
||||
} else {
|
||||
return Optional.empty();
|
||||
|
Reference in New Issue
Block a user