Class StateProviderImpl

    • Constructor Detail

      • StateProviderImpl

        public StateProviderImpl()
    • Method Detail

      • onTopologyUpdate

        public CompletableFuture<Void> onTopologyUpdate​(CacheTopology cacheTopology,
                                                        boolean isRebalance)
        Description copied from interface: StateProvider
        Receive notification of topology changes. Cancels all outbound transfers to destinations that are no longer members. The other outbound transfers remain unaffected.
        Specified by:
        onTopologyUpdate in interface StateProvider
      • stop

        public void stop()
        Description copied from interface: StateProvider
        Cancels all outbound state transfers. This is executed when the cache is shutting down.
        Specified by:
        stop in interface StateProvider
      • getTransactionsForSegments

        public List<TransactionInfo> getTransactionsForSegments​(Address destination,
                                                                int requestTopologyId,
                                                                org.infinispan.commons.util.IntSet segments)
                                                         throws InterruptedException
        Description copied from interface: StateProvider
        Gets the list of transactions that affect keys from the given segments. This is invoked in response to a StateRequestCommand of type StateRequestCommand.Type.GET_TRANSACTIONS.
        Specified by:
        getTransactionsForSegments in interface StateProvider
        Parameters:
        destination - the address of the requester
        Returns:
        list transactions and locks for the given segments
        Throws:
        InterruptedException
      • startOutboundTransfer

        public void startOutboundTransfer​(Address destination,
                                          int requestTopologyId,
                                          org.infinispan.commons.util.IntSet segments,
                                          boolean applyState)
                                   throws InterruptedException
        Description copied from interface: StateProvider
        Start to send cache entries that belong to the given set of segments. This is invoked in response to a StateRequestCommand of type StateRequestCommand.Type.START_STATE_TRANSFER. If the applyState field is set to false, then upon delivery at the destination the cache entries are processed by a StateReceiver and are not applied to the local cache.
        Specified by:
        startOutboundTransfer in interface StateProvider
        Parameters:
        destination - the address of the requester
        Throws:
        InterruptedException
      • cancelOutboundTransfer

        public void cancelOutboundTransfer​(Address destination,
                                           int topologyId,
                                           org.infinispan.commons.util.IntSet segments)
        Description copied from interface: StateProvider
        Cancel sending of cache entries that belong to the given set of segments. This is invoked in response to a StateRequestCommand of type StateRequestCommand.Type.CANCEL_STATE_TRANSFER.
        Specified by:
        cancelOutboundTransfer in interface StateProvider
        Parameters:
        destination - the address of the requester
        segments - the segments that we have to cancel transfer for