Interface StateProvider

    • Method Detail

      • isStateTransferInProgress

        boolean isStateTransferInProgress()
      • onTopologyUpdate

        CompletableFuture<Void> onTopologyUpdate​(CacheTopology cacheTopology,
                                                 boolean isRebalance)
        Receive notification of topology changes. Cancels all outbound transfers to destinations that are no longer members. The other outbound transfers remain unaffected.
        Parameters:
        cacheTopology -
        isRebalance -
      • getTransactionsForSegments

        CompletionStage<List<TransactionInfo>> getTransactionsForSegments​(Address destination,
                                                                          int topologyId,
                                                                          org.infinispan.commons.util.IntSet segments)
        Gets the list of transactions that affect keys from the given segments. This is invoked in response to a StateTransferGetTransactionsCommand.
        Parameters:
        destination - the address of the requester
        topologyId - required topology before we can start collecting transactions
        segments - only return transactions affecting these segments
        Returns:
        a CompletionStage that completes with the list transactions and locks for the given segments
      • startOutboundTransfer

        void startOutboundTransfer​(Address destination,
                                   int topologyId,
                                   org.infinispan.commons.util.IntSet segments,
                                   boolean applyState)
        Start to send cache entries that belong to the given set of segments. This is invoked in response to a StateTransferStartCommand. 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.
        Parameters:
        destination - the address of the requester
        topologyId -
        segments -
        applyState -
      • cancelOutboundTransfer

        void cancelOutboundTransfer​(Address destination,
                                    int topologyId,
                                    org.infinispan.commons.util.IntSet segments)
        Cancel sending of cache entries that belong to the given set of segments. This is invoked in response to a StateTransferCancelCommand.
        Parameters:
        destination - the address of the requester
        topologyId -
        segments - the segments that we have to cancel transfer for
      • start

        void start()
      • stop

        void stop()
        Cancels all outbound state transfers. This is executed when the cache is shutting down.