本文整理汇总了Java中scala.util.matching.Regex类的典型用法代码示例。如果您正苦于以下问题:Java Regex类的具体用法?Java Regex怎么用?Java Regex使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Regex类属于scala.util.matching包,在下文中一共展示了Regex类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
@SuppressWarnings("deprecation")
AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
this.mPort,
20,
List$.MODULE$.<StatsFactory>empty(),
Option.<String>empty(),
List$.MODULE$.<Regex>empty(),
Map$.MODULE$.<String, CustomHttpHandler>empty(),
List.<Duration>fromArray(defaultLatchIntervals));
RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
for (Map.Entry<String, CustomHttpHandler> entry : this.mCustomHttpHandlerMap.entrySet()) {
service.httpServer().createContext(entry.getKey(), entry.getValue());
}
}
示例2: start
import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
@SuppressWarnings("deprecation")
AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
this.mPort,
20,
List$.MODULE$.<StatsFactory>empty(),
Option.<String>empty(),
List$.MODULE$.<Regex>empty(),
Map$.MODULE$.<String, CustomHttpHandler>empty(),
List.<Duration>fromArray(defaultLatchIntervals));
RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
for (Map.Entry<String, CustomHttpHandler> entry: this.mCustomHttpHandlerMap.entrySet()) {
service.httpServer().createContext(entry.getKey(), entry.getValue());
}
}
示例3: start
import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
@SuppressWarnings("deprecation")
AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
this.mPort,
20,
List$.MODULE$.<StatsFactory>empty(),
Option.<String>empty(),
List$.MODULE$.<Regex>empty(),
Map$.MODULE$.<String, CustomHttpHandler>empty(),
List.<Duration>fromArray(defaultLatchIntervals)
);
RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
adminServiceFactory.apply(runtimeEnvironment);
try {
Properties properties = new Properties();
properties.load(this.getClass().getResource("build.properties").openStream());
String buildRevision = properties.getProperty("build_revision", "unknown");
LOG.info("build.properties build_revision: {}",
properties.getProperty("build_revision", "unknown"));
StatsUtil.setLabel("secor.build_revision", buildRevision);
} catch (Throwable t) {
LOG.error("Failed to load properties from build.properties", t);
}
}