Package org.infinispan.statetransfer
Interface StateTransferLock
-
- All Known Implementing Classes:
StateTransferLockImpl
public interface StateTransferLock
We use the state transfer lock for three different things:- We don't want to execute a command until we have the transaction table for that topology id. For this purpose it works like a latch, commands wait on the latch and state transfer opens the latch when it has received all the transaction data for that topology id.
- Do not write anything to the data container in a segment that we have already removed. For this purpose, ownership checks and data container writes acquire a shared lock, and the segment removal acquires an exclusive lock.
- We want to handle state requests only after we have installed the same topology id, because this guarantees that we also have installed the corresponding view id and we have all the joiners in our JGroups view. Here it works like a latch as well, state requests wait on the latch and state transfer opens the latch when it has received all the transaction data for that topology id.
- Since:
- 5.2
- Author:
- anistor@redhat.com, Dan Berindei
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
acquireExclusiveTopologyLock()
void
acquireSharedTopologyLock()
void
notifyTopologyInstalled(int topologyId)
void
notifyTransactionDataReceived(int topologyId)
void
releaseExclusiveTopologyLock()
void
releaseSharedTopologyLock()
CompletableFuture<Void>
topologyFuture(int expectedTopologyId)
boolean
topologyReceived(int expectedTopologyId)
CompletableFuture<Void>
transactionDataFuture(int expectedTopologyId)
boolean
transactionDataReceived(int expectedTopologyId)
default void
waitForTopology(int expectedTopologyId, long timeout, TimeUnit unit)
Deprecated.default void
waitForTransactionData(int expectedTopologyId, long timeout, TimeUnit unit)
Deprecated.
-
-
-
Method Detail
-
acquireExclusiveTopologyLock
void acquireExclusiveTopologyLock()
-
releaseExclusiveTopologyLock
void releaseExclusiveTopologyLock()
-
acquireSharedTopologyLock
void acquireSharedTopologyLock()
-
releaseSharedTopologyLock
void releaseSharedTopologyLock()
-
notifyTransactionDataReceived
void notifyTransactionDataReceived(int topologyId)
-
transactionDataFuture
CompletableFuture<Void> transactionDataFuture(int expectedTopologyId)
-
waitForTransactionData
@Deprecated default void waitForTransactionData(int expectedTopologyId, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException
Deprecated.- Throws:
InterruptedException
TimeoutException
-
transactionDataReceived
boolean transactionDataReceived(int expectedTopologyId)
-
notifyTopologyInstalled
void notifyTopologyInstalled(int topologyId)
-
topologyFuture
CompletableFuture<Void> topologyFuture(int expectedTopologyId)
-
waitForTopology
@Deprecated default void waitForTopology(int expectedTopologyId, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException
Deprecated.- Throws:
InterruptedException
TimeoutException
-
topologyReceived
boolean topologyReceived(int expectedTopologyId)
-
-