Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.statetransfer
Interface StateConsumer

All Known Implementing Classes:
StateConsumerImpl

public interface StateConsumer

Handles inbound state transfers.

Since:
5.2
Author:
anistor@redhat.com

Method Summary
 void addUpdatedKey(Object key)
          Receive notification of updated keys right before they are committed in DataContainer.
 void applyState(Address sender, int topologyId, Collection<StateChunk> stateChunks)
           
 CacheTopology getCacheTopology()
           
 boolean isKeyUpdated(Object key)
          Checks if a given key was updated by user code during state transfer (and consequently it is untouchable by state transfer).
 boolean isStateTransferInProgress()
           
 boolean isStateTransferInProgressForKey(Object key)
           
 void onTopologyUpdate(CacheTopology cacheTopology, boolean isRebalance)
          Receive notification of topology changes.
 void stop()
          Cancels all incoming state transfers.
 void stopApplyingState()
          Stops applying incoming state.
 

Method Detail

getCacheTopology

CacheTopology getCacheTopology()

isStateTransferInProgress

boolean isStateTransferInProgress()

isStateTransferInProgressForKey

boolean isStateTransferInProgressForKey(Object key)

onTopologyUpdate

void onTopologyUpdate(CacheTopology cacheTopology,
                      boolean isRebalance)
Receive notification of topology changes. StateRequestCommands are issued for segments that are new to this member and the segments that are no longer owned are discarded.

Parameters:
cacheTopology -
isRebalance -

applyState

void applyState(Address sender,
                int topologyId,
                Collection<StateChunk> stateChunks)

stop

void stop()
Cancels all incoming state transfers. The already received data is not discarded. This is executed when the cache is shutting down.


addUpdatedKey

void addUpdatedKey(Object key)
Receive notification of updated keys right before they are committed in DataContainer.

Parameters:
key - the key that is being modified

isKeyUpdated

boolean isKeyUpdated(Object key)
Checks if a given key was updated by user code during state transfer (and consequently it is untouchable by state transfer).

Parameters:
key - the key to check
Returns:
true if the key is known to be modified, false otherwise

stopApplyingState

void stopApplyingState()
Stops applying incoming state. Also stops tracking updated keys. Should be called at the end of state transfer or when a ClearCommand is committed during state transfer.


Infinispan Distribution 5.2.6.Final-redhat-2

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