|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mpisws.p2p.transport.peerreview.evidence.EvidenceTransferProtocolImpl<Handle,Identifier>
public class EvidenceTransferProtocolImpl<Handle extends RawSerializable,Identifier extends RawSerializable>
This protocol transfers evidence to the witnesses
Nested Class Summary | |
---|---|
class |
EvidenceTransferProtocolImpl.CacheInfo
Since applications like ePOST must communicate to determine the current witness set of a node (which is expensive), we cache witness sets for a while. |
class |
EvidenceTransferProtocolImpl.MessageInfo
When we have a message for a node whose witness set is not (yet) known, it is queued in here |
class |
EvidenceTransferProtocolImpl.QueryInfo
Here we remember all the questions we've asked the application about witness sets |
Field Summary |
---|
Fields inherited from interface org.mpisws.p2p.transport.peerreview.StatusConstants |
---|
STATUS_EXPOSED, STATUS_SUSPECTED, STATUS_TRUSTED |
Constructor Summary | |
---|---|
EvidenceTransferProtocolImpl(PeerReview<Handle,Identifier> peerreview,
IdentityTransport<Handle,Identifier> transport,
PeerInfoStore<Handle,Identifier> infoStore)
|
Method Summary | |
---|---|
protected java.util.Collection<Handle> |
getWitnesses(Identifier subject)
Either returns the valid cached value, or returns null Often requestWitnesses() is called next If it returns null, then notifyWitnessSet() will be called later |
void |
notifyWitnessSet(Identifier subject,
java.util.Collection<Handle> witnesses)
Called when the local node learns about the members of another node's witness set. |
void |
requestWitnesses(java.util.Collection<Identifier> subjectList,
Continuation<java.util.Map<Identifier,java.util.Collection<Handle>>,java.lang.Exception> c)
|
protected void |
requestWitnesses(Identifier subject)
Only call me if there isn't already a valid witness set |
void |
sendEvidence(Handle target,
Identifier subject)
When this is called, some node has asked us for evidence about another node, and we have found either (a) an unanswered challenge, or (b) a proof of misbehavior. |
void |
sendMessageToWitnesses(Identifier subject,
PeerReviewMessage message,
MessageCallback<Handle,java.nio.ByteBuffer> deliverAckToMe,
java.util.Map<java.lang.String,java.lang.Object> options)
Send a message to all the members of the target node's witness set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EvidenceTransferProtocolImpl(PeerReview<Handle,Identifier> peerreview, IdentityTransport<Handle,Identifier> transport, PeerInfoStore<Handle,Identifier> infoStore)
Method Detail |
---|
public void notifyWitnessSet(Identifier subject, java.util.Collection<Handle> witnesses)
notifyWitnessSet
in interface WitnessListener<Handle extends RawSerializable,Identifier extends RawSerializable>
public void sendMessageToWitnesses(Identifier subject, PeerReviewMessage message, MessageCallback<Handle,java.nio.ByteBuffer> deliverAckToMe, java.util.Map<java.lang.String,java.lang.Object> options)
sendMessageToWitnesses
in interface EvidenceTransferProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
public void requestWitnesses(java.util.Collection<Identifier> subjectList, Continuation<java.util.Map<Identifier,java.util.Collection<Handle>>,java.lang.Exception> c)
requestWitnesses
in interface EvidenceTransferProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
protected java.util.Collection<Handle> getWitnesses(Identifier subject)
subject
-
protected void requestWitnesses(Identifier subject)
subject
- public void sendEvidence(Handle target, Identifier subject)
sendEvidence
in interface EvidenceTransferProtocol<Handle extends RawSerializable,Identifier extends RawSerializable>
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |