public class Digest extends java.lang.Object implements Streamable, java.lang.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(java.util.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(java.util.Map<Address,long[]> map) |
boolean |
equals(java.lang.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 ! :-)
|
java.util.Iterator<Digest.Entry> |
iterator() |
void |
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream
Note that the input stream must not be closed
|
void |
readFrom(java.io.DataInput in,
boolean read_addrs) |
long |
serializedSize(boolean with_members) |
java.lang.String |
toString() |
java.lang.String |
toString(Address[] order,
boolean print_highest_received) |
java.lang.String |
toString(Digest order) |
void |
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.
|
void |
writeTo(java.io.DataOutput out,
boolean write_addrs) |
protected Address[] members
protected long[] seqnos
public Digest()
public Digest(Address[] members, long[] seqnos)
public Digest(Address[] members)
public Digest(Digest digest)
public Digest(java.util.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(java.lang.Object obj)
equals
in class java.lang.Object
public long[] get(Address member)
member
- public java.util.Iterator<Digest.Entry> iterator()
iterator
in interface java.lang.Iterable<Digest.Entry>
public Digest copy()
public void writeTo(java.io.DataOutput out) throws java.lang.Exception
Streamable
writeTo
in interface Streamable
java.lang.Exception
public void writeTo(java.io.DataOutput out, boolean write_addrs) throws java.lang.Exception
java.lang.Exception
public void readFrom(java.io.DataInput in) throws java.lang.Exception
Streamable
readFrom
in interface Streamable
java.lang.Exception
public void readFrom(java.io.DataInput in, boolean read_addrs) throws java.lang.Exception
java.lang.Exception
public long serializedSize(boolean with_members)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(Digest order)
public java.lang.String toString(Address[] order, boolean print_highest_received)
protected int find(Address mbr)
protected void createArrays(java.util.Map<Address,long[]> map)
protected void checkPostcondition()
Copyright © 1998-2020 Red Hat. All Rights Reserved.