forked from elastic/apm-agent-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elastic#3030: Introduce configuration API within SPI package that act…
…s as a binary compatible mirror of the current configuration.
- Loading branch information
Showing
89 changed files
with
1,321 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...gent-core/src/main/java/co/elastic/apm/agent/configuration/converter/WildcardMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package co.elastic.apm.agent.configuration.converter; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class WildcardMatcher extends co.elastic.apm.agent.common.util.WildcardMatcher implements co.elastic.apm.plugin.spi.WildcardMatcher { | ||
|
||
private static final WildcardMatcher MATCH_ALL = new WildcardMatcher(co.elastic.apm.agent.common.util.WildcardMatcher.matchAll()); | ||
private static final List<WildcardMatcher> MATCH_ALL_LIST = Collections.singletonList(MATCH_ALL); | ||
|
||
private final co.elastic.apm.agent.common.util.WildcardMatcher matcher; | ||
|
||
public WildcardMatcher(co.elastic.apm.agent.common.util.WildcardMatcher matcher) { | ||
this.matcher = matcher; | ||
} | ||
|
||
public static WildcardMatcher valueOf(String wildcardString) { | ||
return new WildcardMatcher(co.elastic.apm.agent.common.util.WildcardMatcher.valueOf(wildcardString)); | ||
} | ||
|
||
public static WildcardMatcher caseSensitiveMatcher(String matcher) { | ||
return new WildcardMatcher(co.elastic.apm.agent.common.util.WildcardMatcher.caseSensitiveMatcher(matcher)); | ||
} | ||
|
||
public static WildcardMatcher matchAll() { | ||
return MATCH_ALL; | ||
} | ||
|
||
public static List<WildcardMatcher> matchAllList() { | ||
return MATCH_ALL_LIST; | ||
} | ||
|
||
@Override | ||
public boolean matches(CharSequence s) { | ||
return matcher.matches(s); | ||
} | ||
|
||
@Override | ||
public boolean matches(CharSequence firstPart, @Nullable CharSequence secondPart) { | ||
return matcher.matches(firstPart, secondPart); | ||
} | ||
|
||
@Override | ||
public String getMatcher() { | ||
return matcher.getMatcher(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.