Interface RpcManager

  • All Known Implementing Classes:
    ExtendedStatisticRpcManager, RpcManagerImpl

    public interface RpcManager
    Provides a mechanism for communicating with other caches in the cluster, by formatting and passing requests down to the registered Transport.
    Since:
    4.0
    Author:
    Manik Surtani, Mircea.Markus@jboss.com
    • Method Detail

      • blocking

        <T> T blocking​(CompletionStage<T> request)
        Block on a request and return its result.
        Since:
        9.2
      • sendTo

        void sendTo​(Address destination,
                    ReplicableCommand command,
                    org.infinispan.remoting.inboundhandler.DeliverOrder deliverOrder)
        Asynchronously sends the ReplicableCommand to the destination using the specified DeliverOrder.
        Parameters:
        destination - the destination's Address.
        command - the ReplicableCommand to send.
        deliverOrder - the DeliverOrder to use.
      • sendToMany

        void sendToMany​(Collection<Address> destinations,
                        ReplicableCommand command,
                        org.infinispan.remoting.inboundhandler.DeliverOrder deliverOrder)
        Asynchronously sends the ReplicableCommand to the set of destination using the specified DeliverOrder.
        Parameters:
        destinations - the collection of destination's Address. If null, it sends to all the members in the cluster.
        command - the ReplicableCommand to send.
        deliverOrder - the DeliverOrder to use.
      • sendToAll

        void sendToAll​(ReplicableCommand command,
                       org.infinispan.remoting.inboundhandler.DeliverOrder deliverOrder)
        Asynchronously sends the ReplicableCommand to the entire cluster.
        Since:
        9.2
      • invokeXSite

        <O> XSiteResponse<O> invokeXSite​(org.infinispan.xsite.XSiteBackup backup,
                                         org.infinispan.xsite.XSiteReplicateCommand<O> command)
        Sends the XSiteReplicateCommand to a remote site.

        If XSiteBackup.isSync() returns false, the XSiteResponse is only completed when the an ACK from the remote site is received. The invoker needs to make sure not to wait for the XSiteResponse.

        Parameters:
        backup - The site to where the command is sent.
        command - The command to send.
        Returns:
        A XSiteResponse that is completed when the request is completed.
      • getTransport

        Transport getTransport()
        Returns:
        a reference to the underlying transport.
      • getMembers

        List<Address> getMembers()
        Returns members of a cluster scoped to the cache owning this RpcManager. Note that this List is always a subset of Transport.getMembers()
        Returns:
        a list of cache scoped cluster members
      • getAddress

        Address getAddress()
        Returns the address associated with this RpcManager or null if not part of the cluster.
      • getTopologyId

        int getTopologyId()
        Returns the current topology id. As opposed to the viewId which is updated whenever the cluster changes, the topologyId is updated when a new cache instance is started or removed - this doesn't necessarily coincide with a node being added/removed to the cluster.
      • getSyncRpcOptions

        RpcOptions getSyncRpcOptions()
        Returns:
        The default options for synchronous remote invocations.
      • getTotalSyncRpcOptions

        default RpcOptions getTotalSyncRpcOptions()
        Returns:
        The default options for total order remote invocations.