|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.tomp2p.rpc.DigestInfo
public class DigestInfo
Calculates or sets a global hash. The digest is used in two places: for routing, where a message needs to have a predictable size. Thus in this case a global hash is calculated. The second usage is get() for getting a list of hashes from peers. Here we don't need to restrict ourself, since we use TCP.
| Constructor Summary | |
|---|---|
DigestInfo()
Empty constructor is used to add the hashes to the list. |
|
DigestInfo(int size)
Create a digest with the size only. |
|
DigestInfo(Number160 keyDigest,
int size)
If a global hash has already been calculated, then this constructor is used to store those. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Number160 |
getKeyDigest()
|
List<Number160> |
getKeyDigests()
|
int |
getSize()
|
int |
hashCode()
|
boolean |
isEmpty()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DigestInfo()
public DigestInfo(int size)
size -
public DigestInfo(Number160 keyDigest,
int size)
keyDigest - size - | Method Detail |
|---|
public Number160 getKeyDigest()
public List<Number160> getKeyDigests()
public int getSize()
public boolean isEmpty()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||