public class MutableDigest extends Digest
Digest.DigestEntry, Digest.MyIterator
Modifier and Type | Field and Description |
---|---|
protected int |
current_index |
protected static double |
RESIZE_FACTOR |
protected boolean |
sealed |
Modifier | Constructor and Description |
---|---|
|
MutableDigest()
Used for externalization
|
protected |
MutableDigest(Address[] members,
long[] seqnos,
int current_index) |
|
MutableDigest(Digest digest) |
|
MutableDigest(int size) |
|
MutableDigest(Map<Address,long[]> map) |
Modifier and Type | Method and Description |
---|---|
void |
add(Address member,
long highest_delivered_seqno,
long highest_received_seqno) |
void |
add(Address member,
long highest_delivered_seqno,
long highest_received_seqno,
boolean replace) |
void |
add(Digest digest) |
void |
add(Digest digest,
boolean replace) |
protected void |
checkSealed() |
void |
clear() |
MutableDigest |
copy() |
void |
incrementHighestDeliveredSeqno(Address member)
Increments the sender's highest delivered seqno by 1
|
void |
merge(Address member,
long highest_delivered_seqno,
long highest_received_seqno)
Similar to add(), but if the sender already exists, its seqnos will be modified (no new entry) as follows:
this.highest_delivered_seqno=max(this.highest_delivered_seqno, highest_delivered_seqno)
this.highest_received_seqno=max(this.highest_received_seqno, highest_received_seqno)
If the member doesn not exist, a new entry will be added (provided there is enough space)
|
void |
merge(Digest digest)
Adds a digest to this digest.
|
void |
replace(Digest d) |
protected void |
resize() |
void |
seal()
Seals the instance against modifications
|
void |
setHighestDeliveredAndSeenSeqnos(Address member,
long highest_delivered_seqno,
long highest_received_seqno) |
int |
size() |
contains, containsAll, createArrays, createArrays, difference, equals, find, get, getMembers, highestDeliveredSeqnoAt, highestReceivedSeqnoAt, highestSequence, isGreaterThanOrEqual, iterator, printHighestDeliveredSeqnos, readFrom, sameSenders, serializedSize, toString, toStringSorted, toStringSorted, writeTo
protected static final double RESIZE_FACTOR
protected boolean sealed
protected int current_index
protected MutableDigest(Address[] members, long[] seqnos, int current_index)
public MutableDigest()
public MutableDigest(int size)
public MutableDigest(Digest digest)
public void add(Address member, long highest_delivered_seqno, long highest_received_seqno)
public void add(Address member, long highest_delivered_seqno, long highest_received_seqno, boolean replace)
public void add(Digest digest)
public void add(Digest digest, boolean replace)
public void replace(Digest d)
public MutableDigest copy()
public void merge(Digest digest)
public void merge(Address member, long highest_delivered_seqno, long highest_received_seqno)
public void incrementHighestDeliveredSeqno(Address member)
public void clear()
public void setHighestDeliveredAndSeenSeqnos(Address member, long highest_delivered_seqno, long highest_received_seqno)
public void seal()
protected void resize()
protected final void checkSealed()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.