Skip to content

Commit

Permalink
ISPN-10686 Lazy property replacement for built-in JGroups stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
tristantarrant authored and ryanemerson committed Sep 28, 2019
1 parent 7ad546e commit 89c3459
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -19,13 +19,14 @@
public class FileJGroupsChannelConfigurator implements JGroupsChannelConfigurator {
private final String name;
private final String path;
final List<ProtocolConfiguration> stack;
private final Properties properties;
private final List<ProtocolConfiguration> stack;

public FileJGroupsChannelConfigurator(String name, String path, InputStream is, Properties properties) throws IOException {
this.name = name;
this.path = path;
this.stack = XmlConfigurator.getInstance(is).getProtocolStack();
this.stack.forEach(c -> StringPropertyReplacer.replaceProperties(c.getProperties(), properties));
this.properties = properties;
}

@Override
Expand All @@ -35,6 +36,7 @@ public String getProtocolStackString() {

@Override
public List<ProtocolConfiguration> getProtocolStack() {
this.stack.forEach(c -> StringPropertyReplacer.replaceProperties(c.getProperties(), properties));
return stack;
}

Expand Down

0 comments on commit 89c3459

Please sign in to comment.