@@ -34,7 +34,7 @@ public abstract class SignalEnvironment {
34
34
35
35
private static final Executor IMMEDIATE_EXECUTOR = Runnable ::run ;
36
36
37
- private static final Executor DEFAULT_EFFECT_DISPATCHER = task -> {
37
+ private static final Executor EFFECT_DISPATCHER_FALLBACK = task -> {
38
38
resolve (SignalEnvironment ::getFallbackEffectDispatcher ,
39
39
IMMEDIATE_EXECUTOR ).execute (task );
40
40
};
@@ -46,7 +46,7 @@ public abstract class SignalEnvironment {
46
46
* @return <code>true</code> if this environment is active,
47
47
* <code>false</code> if it's inactive
48
48
*/
49
- public abstract boolean isActive ();
49
+ protected abstract boolean isActive ();
50
50
51
51
/**
52
52
* Gets an executor to use for asynchronously notifying about operation
@@ -62,7 +62,7 @@ public abstract class SignalEnvironment {
62
62
* @return an executor to use for notifying about operation results, or
63
63
* <code>null</code> to notify about results immediately
64
64
*/
65
- public abstract Executor getResultNotifier ();
65
+ protected abstract Executor getResultNotifier ();
66
66
67
67
/**
68
68
* Gets an executor to use for running the callback of an effect. This
@@ -82,7 +82,7 @@ public abstract class SignalEnvironment {
82
82
* @return an executor to use for invoking effect callbacks, or
83
83
* <code>null</code> to use the fallback dispatcher
84
84
*/
85
- public abstract Executor getEffectDispatcher ();
85
+ protected abstract Executor getEffectDispatcher ();
86
86
87
87
/**
88
88
* Gets an executor to use for running the callback of an effect that
@@ -98,7 +98,7 @@ public abstract class SignalEnvironment {
98
98
* their own dispatcher, or <code>null</code> to invoke the
99
99
* callbacks immediately
100
100
*/
101
- public abstract Executor getFallbackEffectDispatcher ();
101
+ protected abstract Executor getFallbackEffectDispatcher ();
102
102
103
103
/**
104
104
* Registers a signal environment to consider when processing signal
@@ -151,6 +151,6 @@ public static Executor getCurrentResultNotifier() {
151
151
*/
152
152
public static Executor getCurrentEffectDispatcher () {
153
153
return resolve (SignalEnvironment ::getEffectDispatcher ,
154
- DEFAULT_EFFECT_DISPATCHER );
154
+ EFFECT_DISPATCHER_FALLBACK );
155
155
}
156
156
}
0 commit comments