Class StateProviderImpl

    • Field Detail

      • cacheName

        protected String cacheName
      • commandsFactory

        protected org.infinispan.commands.CommandsFactory commandsFactory
      • dataContainer

        protected org.infinispan.container.impl.InternalDataContainer dataContainer
      • entryFactory

        protected org.infinispan.container.impl.InternalEntryFactory entryFactory
      • timeout

        protected long timeout
      • chunkSize

        protected int chunkSize
    • 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,
                                                                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,
                                          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,
                                           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