Class LocalInvocation

  • All Implemented Interfaces:
    java.util.concurrent.Callable<Response>, java.util.function.Function<java.lang.Object,​Response>

    public class LocalInvocation
    extends java.lang.Object
    implements java.util.concurrent.Callable<Response>, java.util.function.Function<java.lang.Object,​Response>
    Simulates a remote invocation on the local node. This is needed because the transport does not redirect to itself the replicable commands.
    Since:
    7.0
    Author:
    Pedro Ruivo
    • Method Detail

      • call

        public Response call()
                      throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<Response>
        Throws:
        java.lang.Exception
      • newInstanceFromCache

        public static LocalInvocation newInstanceFromCache​(Cache<?,​?> cache,
                                                           org.infinispan.commands.remote.CacheRpcCommand command)
      • newInstance

        public static LocalInvocation newInstance​(ResponseGenerator responseGenerator,
                                                  org.infinispan.commands.remote.CacheRpcCommand command,
                                                  org.infinispan.commands.CommandsFactory commandsFactory,
                                                  Address self)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • callAsync

        public java.util.concurrent.CompletableFuture<Response> callAsync()
      • apply

        public Response apply​(java.lang.Object retVal)
        Specified by:
        apply in interface java.util.function.Function<java.lang.Object,​Response>