MCPcopy Create free account
hub / github.com/belaban/JGroups / addProtocol

Method addProtocol

src/org/jgroups/stack/ProtocolStack.java:461–475  ·  view source on GitHub ↗

Adds a protocol at the tail of the protocol list @since 2.11

(Protocol prot)

Source from the content-addressed store, hash-verified

459 * @since 2.11
460 */
461 public ProtocolStack addProtocol(Protocol prot) {
462 if(prot == null)
463 return this;
464 prot.setProtocolStack(this);
465 prot.setUpProtocol(this);
466 if(bottom_prot == null) {
467 top_prot=bottom_prot=prot;
468 return this;
469 }
470
471 prot.setDownProtocol(top_prot);
472 prot.getDownProtocol().setUpProtocol(prot);
473 top_prot=prot;
474 return this;
475 }
476
477 /**
478 * Adds a list of protocols

Callers 3

addProtocolsMethod · 0.95
JChannelMethod · 0.45
testInjectViewMethod · 0.45

Calls 4

setProtocolStackMethod · 0.80
setUpProtocolMethod · 0.80
setDownProtocolMethod · 0.80
getDownProtocolMethod · 0.80

Tested by 1

testInjectViewMethod · 0.36