uka.patch
Class DistributionJournal
java.lang.Object
uka.patch.DistributionJournal
- public final class DistributionJournal
- extends java.lang.Object
A distribution journal records changes to the specified object
distribution of a replicated object. These changes are committed to
the internal management structures only upon update time. Since the
update process may need the state of the distribution before the
modification, it is necessary to log these changes instead of
modifying the distribution directly.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
private final int size
objects
private final IDMap objects
- Internal object to ID translation. The distribution journal
needs its own identifier space, because it is possible to
specify the distribution of an object that is not yet part of
the replicated state and has not yet an identifier assigned
there.
distribution
private final EnlargingBooleanArray2D distribution
- Mapping
ID x Rank -> boolean. Holds the specified
distribution for each object in the objects map.
DistributionJournal
public DistributionJournal(int size)
setSpecified
public void setSpecified(java.lang.Object obj,
int[] ranks)
setSpecified
public void setSpecified(java.lang.Object obj,
boolean[] ranks)
findID
public int findID(java.lang.Object obj)
getObject
public java.lang.Object getObject(int id)
getUsedIDs
public IntIterator getUsedIDs()
isValid
public boolean isValid(int id)
isSpecified
public boolean isSpecified(int id,
int rank)
remove
public void remove(int id)
toStringSpecified
public java.lang.String toStringSpecified(int id)
clear
public void clear()
- Clears the journal. This method is called, after the
distribution journal is committed to the management structures
of the corresponding replicated object at the end of each
update.