Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.statetransfer
Interface StateProvider

All Known Implementing Classes:
StateProviderImpl

public interface StateProvider

Handles outbound state transfers.

Since:
5.2
Author:
anistor@redhat.com

Method Summary
 void cancelOutboundTransfer(Address destination, int topologyId, Set<Integer> segments)
          Cancel sending of cache entries that belong to the given set of segments.
 List<TransactionInfo> getTransactionsForSegments(Address destination, int topologyId, Set<Integer> segments)
          Gets the list of transactions that affect keys from the given segments.
 boolean isStateTransferInProgress()
           
 void onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
          Receive notification of topology changes.
 void start()
           
 void startOutboundTransfer(Address destination, int topologyId, Set<Integer> segments)
          Start to send cache entries that belong to the given set of segments.
 void stop()
          Cancels all outbound state transfers.
 

Method Detail

isStateTransferInProgress

boolean isStateTransferInProgress()

onTopologyUpdate

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

List<TransactionInfo> getTransactionsForSegments(Address destination,
                                                 int topologyId,
                                                 Set<Integer> segments)
                                                 throws InterruptedException
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.

Parameters:
destination - the address of the requester
topologyId -
segments -
Returns:
list transactions and locks for the given segments
Throws:
InterruptedException

startOutboundTransfer

void startOutboundTransfer(Address destination,
                           int topologyId,
                           Set<Integer> segments)
                           throws InterruptedException
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.

Parameters:
destination - the address of the requester
topologyId -
segments -
Throws:
InterruptedException

cancelOutboundTransfer

void cancelOutboundTransfer(Address destination,
                            int topologyId,
                            Set<Integer> segments)
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.

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.


Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.