Class StateProviderImpl

    • Field Detail

      • cacheName

        protected java.lang.String cacheName
      • commandsFactory

        protected org.infinispan.commands.CommandsFactory commandsFactory
      • dataContainer

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

        protected java.util.concurrent.ExecutorService executorService
      • 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 java.util.concurrent.CompletableFuture<java.lang.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 java.util.List<TransactionInfo> getTransactionsForSegments​(Address destination,
                                                                          int requestTopologyId,
                                                                          IntSet segments)
                                                                   throws java.lang.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:
        java.lang.InterruptedException
      • startOutboundTransfer

        public void startOutboundTransfer​(Address destination,
                                          int requestTopologyId,
                                          IntSet segments,
                                          boolean applyState)
                                   throws java.lang.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:
        java.lang.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