• Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 15.0.0.Dev03, 14.0.20.Final
    • 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 
      }
      
      

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: