-
Sub-task
-
Resolution: Done
-
Major
-
None
-
None
-
None
The current code only allows cache-based cross-site commands. To work on the events and state transfer, we need global commands, in other words, commands that aren't attached to a cache.
A possible solution would be a single interface for global commands
interface XSiteGlobalReplicableCommand<T> extends ReplicableCommand { CompletionState<T> invokeOnLocalSite(String origin, GlobalComponentRegistry registry); }
and another interface or abstract class that fetches the cache component registry.
interface XSiteCacheReplicableCommand<T> extends XSiteGlobalReplicableCommand { default CompletionState<T> invokeOnLocalSite(String origin, GlobalComponentRegistry registry) { // lookup cache, fail if not found return invokeOnLocalSite(String origin, ComponentRegistry registry); } CompletionState<T> invokeOnLocalSite(String origin, ComponentRegistry }