public class Digest extends Object implements Streamable, Iterable<Digest.Entry>
Modifier and Type | Class and Description |
---|---|
static class |
Digest.Entry
Keeps track of one members plus its highest delivered and received seqnos
|
protected class |
Digest.MyIterator |
Modifier and Type | Field and Description |
---|---|
protected Address[] |
members |
protected long[] |
seqnos |
Constructor and Description |
---|
Digest()
Used for serialization
|
Digest(Address[] members)
Only used internally, don't use !
|
Digest(Address[] members,
long[] seqnos) |
Digest(Address sender,
long highest_delivered,
long highest_received) |
Digest(Digest digest)
Only used for testing
|
Digest(Map<Address,long[]> map)
Creates a new digest from an existing map by copying the keys and values from map
|
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
protected void |
checkPostcondition() |
boolean |
contains(Address mbr) |
boolean |
containsAll(Address... members) |
Digest |
copy() |
protected void |
createArrays(Map<Address,long[]> map) |
boolean |
equals(Object obj)
2 digests are equal if their memberships match and all highest-delivered and highest-received seqnos match
|
protected int |
find(Address mbr) |
long[] |
get(Address member)
Returns the highest delivered and received seqnos associated with a member.
|
Address[] |
getMembersRaw()
Don't use, this method is reserved for Bela ! :-)
|
Iterator<Digest.Entry> |
iterator() |
void |
readFrom(DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void |
readFrom(DataInput in,
boolean read_addrs) |
long |
serializedSize(boolean with_members) |
String |
toString() |
String |
toString(Address[] order,
boolean print_highest_received) |
String |
toString(Digest order) |
void |
writeTo(DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
void |
writeTo(DataOutput out,
boolean write_addrs) |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected Address[] members
protected long[] seqnos
public Digest()
public Digest(Address[] members, long[] seqnos)
public Digest(Address[] members)
public Digest(Digest digest)
public Digest(Map<Address,long[]> map)
public Digest(Address sender, long highest_delivered, long highest_received)
public Address[] getMembersRaw()
public int capacity()
public boolean contains(Address mbr)
public boolean containsAll(Address... members)
public boolean equals(Object obj)
public long[] get(Address member)
member
- public Iterator<Digest.Entry> iterator()
iterator
in interface Iterable<Digest.Entry>
public Digest copy()
public void writeTo(DataOutput out) throws Exception
Streamable
writeTo
in interface Streamable
Exception
public void writeTo(DataOutput out, boolean write_addrs) throws Exception
Exception
public void readFrom(DataInput in) throws Exception
Streamable
readFrom
in interface Streamable
Exception
public long serializedSize(boolean with_members)
protected int find(Address mbr)
protected void checkPostcondition()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.