Class BroadcastServiceLocal

  • All Implemented Interfaces:
    BroadcastService

    @Component
    @ConditionalOnSingleCandidate(BroadcastService.class)
    public class BroadcastServiceLocal
    extends java.lang.Object
    implements BroadcastService
    This implementation does nothing, to be used in a single node environment. When cluster feature is enabled, an other implementation of the BroadcastService dispatch calls to other nodes.
    Author:
    Baptiste Mesta
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.util.concurrent.Future<java.util.Map<java.lang.String,​TaskResult<T>>> executeOnOthers​(java.util.concurrent.Callable<T> callable)
      Broadcast the execution of a callable on other nodes and returns immediately a future holding the execution result on each node (once available).
      <T> java.util.concurrent.Future<java.util.Map<java.lang.String,​TaskResult<T>>> executeOnOthers​(java.util.concurrent.Callable<T> callable, java.lang.Long tenantId)
      Broadcast the execution of a callable on other nodes and returns immediately a future holding the execution result on each node (once available).
      <T> java.util.Map<java.lang.String,​TaskResult<T>> executeOnOthersAndWait​(java.util.concurrent.Callable<T> callable, java.lang.Long tenantId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BroadcastServiceLocal

        public BroadcastServiceLocal()
    • Method Detail

      • executeOnOthers

        public <T> java.util.concurrent.Future<java.util.Map<java.lang.String,​TaskResult<T>>> executeOnOthers​(java.util.concurrent.Callable<T> callable)
        Description copied from interface: BroadcastService
        Broadcast the execution of a callable on other nodes and returns immediately a future holding the execution result on each node (once available).
        The callable will be executed using a platform level session on other nodes.
        Specified by:
        executeOnOthers in interface BroadcastService
        Type Parameters:
        T - type of the returned value
        Parameters:
        callable - callable that will be executed on all nodes except the current one
        Returns:
        a future of a map containing the name of the node and the result of the callable
      • executeOnOthers

        public <T> java.util.concurrent.Future<java.util.Map<java.lang.String,​TaskResult<T>>> executeOnOthers​(java.util.concurrent.Callable<T> callable,
                                                                                                                    java.lang.Long tenantId)
        Description copied from interface: BroadcastService
        Broadcast the execution of a callable on other nodes and returns immediately a future holding the execution result on each node (once available).
        The callable will be executed using a tenant level session on other nodes.
        Specified by:
        executeOnOthers in interface BroadcastService
        Type Parameters:
        T - type of the returned value
        Parameters:
        callable - callable that will be executed on all nodes except the current one
        tenantId - the if of the tenant
        Returns:
        a future of a map containing the name of the node and the result of the callable
      • executeOnOthersAndWait

        public <T> java.util.Map<java.lang.String,​TaskResult<T>> executeOnOthersAndWait​(java.util.concurrent.Callable<T> callable,
                                                                                              java.lang.Long tenantId)
        Specified by:
        executeOnOthersAndWait in interface BroadcastService