|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.cacheviews.PendingCacheViewChanges
public class PendingCacheViewChanges
This class is used on the coordinator to keep track of changes since the last merge. When the coordinator changes or in case of a merge, the new coordinator recovers the last committed view from all the members and rolls back any uncommitted views, then it prepares a new view if necessary.
Constructor Summary | |
---|---|
PendingCacheViewChanges(String cacheName)
|
Method Summary | |
---|---|
Set<Address> |
computeMissingJoiners(Collection<Address> newMembers)
|
CacheView |
createPendingView(CacheView committedView)
Called on the coordinator to create the view that will be prepared next. |
int |
getLastViewId()
|
Set<Address> |
getLeavers()
|
int |
getRollbackViewId()
Called on the coordinator before a rollback to assign a unique view id to the rollback. |
boolean |
hasChanges()
|
boolean |
isViewInstallationInProgress()
|
void |
recoveredViews(Collection<Address> newMembers,
Collection<Address> recoveredJoiners)
Signal a merge |
void |
requestJoin(Address joiner)
Signal a join |
Set<Address> |
requestLeave(Collection<Address> leavers)
Signal a leave. |
void |
resetChanges(CacheView committedView)
|
void |
updateLatestViewId(int viewId)
If we recovered a view after a merge or coordinator change we need to make sure the next view id is greater than any view id that was already committed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PendingCacheViewChanges(String cacheName)
Method Detail |
---|
public CacheView createPendingView(CacheView committedView)
prepareView
will have no effect.
public int getRollbackViewId()
public boolean hasChanges()
public void resetChanges(CacheView committedView)
public void requestJoin(Address joiner)
public Set<Address> requestLeave(Collection<Address> leavers)
public void recoveredViews(Collection<Address> newMembers, Collection<Address> recoveredJoiners)
public void updateLatestViewId(int viewId)
public Set<Address> getLeavers()
resetChanges
callpublic Set<Address> computeMissingJoiners(Collection<Address> newMembers)
joiners
collection but not in the newMembers
collection.public boolean isViewInstallationInProgress()
createPendingView
has been called without a pair resetChanges
public int getLastViewId()
updateLatestViewId
.
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |