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

Method findProtocols

src/org/jgroups/stack/ProtocolStack.java:682–695  ·  view source on GitHub ↗
(String regexp)

Source from the content-addressed store, hash-verified

680 }
681
682 public <T extends Protocol> List<T> findProtocols(String regexp) {
683 List<T> retval=null;
684 Pattern pattern=Pattern.compile(regexp);
685
686 for(T prot=(T)top_prot; prot != null; prot=prot.getDownProtocol()) {
687 String prot_name=prot.getName();
688 if(pattern.matcher(prot_name).matches()) {
689 if(retval == null)
690 retval=new ArrayList<>();
691 retval.add(prot);
692 }
693 }
694 return retval;
695 }
696
697 public <T extends Protocol> T getBottomProtocol() {
698 T curr_prot=(T)this;

Callers 2

handleProbeMethod · 0.95
dumpStatsMethod · 0.95

Calls 4

getDownProtocolMethod · 0.80
getNameMethod · 0.65
matchesMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected