public class TriangleOrderManager extends Object
It depends on the cache topology id. The primary owner assigns the sequence number to the backup command and then sends it to the backup owner. In the backup owner, the command awaits until it is its turn to be executed.
If the command topology id does not match, it throws an OutdatedTopologyException
.
The sequence order starts with 1 and it is per segment based. This allows segments to be updated concurrently.
Constructor and Description |
---|
TriangleOrderManager(int segments) |
Modifier and Type | Method and Description |
---|---|
boolean |
isNext(int segmentId,
long sequenceNumber,
int commandTopologyId) |
void |
markDelivered(int segmentId,
long sequenceNumber,
int commandTopologyId) |
long |
next(int segmentId,
int commandTopologyId) |
void |
updateCacheTopology(CacheTopology newCacheTopology) |
public long next(int segmentId, int commandTopologyId)
public boolean isNext(int segmentId, long sequenceNumber, int commandTopologyId)
public void markDelivered(int segmentId, long sequenceNumber, int commandTopologyId)
public void updateCacheTopology(CacheTopology newCacheTopology)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.