当前位置: 首页>>代码示例>>Java>>正文


Java RestartEndpoint类代码示例

本文整理汇总了Java中org.springframework.cloud.context.restart.RestartEndpoint的典型用法代码示例。如果您正苦于以下问题:Java RestartEndpoint类的具体用法?Java RestartEndpoint怎么用?Java RestartEndpoint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RestartEndpoint类属于org.springframework.cloud.context.restart包,在下文中一共展示了RestartEndpoint类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configurationUpdateStrategy

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
/**
 * Provides the action to execute when the configuration changes.
 */
@Bean
@ConditionalOnMissingBean
public ConfigurationUpdateStrategy configurationUpdateStrategy(ConfigReloadProperties properties, ConfigurableApplicationContext ctx, RestartEndpoint restarter, ContextRefresher refresher) {
    switch (properties.getStrategy()) {
    case RESTART_CONTEXT:
        return new ConfigurationUpdateStrategy(properties.getStrategy().name(), restarter::restart);
    case REFRESH:
        return new ConfigurationUpdateStrategy(properties.getStrategy().name(), refresher::refresh);
    case SHUTDOWN:
        return new ConfigurationUpdateStrategy(properties.getStrategy().name(), ctx::close);
    }
    throw new IllegalStateException("Unsupported configuration update strategy: " + properties.getStrategy());
}
 
开发者ID:fabric8io,项目名称:spring-cloud-kubernetes,代码行数:17,代码来源:ConfigReloadAutoConfiguration.java

示例2: restartEndpoint

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Bean
@ConditionalOnEnabledEndpoint
@ConditionalOnMissingBean
public RestartEndpoint restartEndpoint() {
	RestartEndpoint endpoint = new RestartEndpoint();
	if (this.exporter != null) {
		endpoint.setIntegrationMBeanExporter(this.exporter);
	}
	return endpoint;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:11,代码来源:RefreshEndpointAutoConfiguration.java

示例3: pauseEndpoint

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Bean
@ConditionalOnBean(RestartEndpoint.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public RestartEndpoint.PauseEndpoint pauseEndpoint(RestartEndpoint restartEndpoint) {
	return restartEndpoint.getPauseEndpoint();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:8,代码来源:RefreshEndpointAutoConfiguration.java

示例4: resumeEndpoint

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Bean
@ConditionalOnBean(RestartEndpoint.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public RestartEndpoint.ResumeEndpoint resumeEndpoint(
		RestartEndpoint restartEndpoint) {
	return restartEndpoint.getResumeEndpoint();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:9,代码来源:RefreshEndpointAutoConfiguration.java

示例5: pauseEndpointEnabled

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Test
public void pauseEndpointEnabled() {
	beanCreatedAndEndpointEnabled("pauseEndpoint", RestartEndpoint.PauseEndpoint.class,
			RestartEndpoint.PauseEndpoint::pause,
			"management.endpoint.restart.enabled=true",
			"management.endpoint.pause.enabled=true");
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:8,代码来源:LifecycleMvcAutoConfigurationTests.java

示例6: resumeEndpointEnabled

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Test
public void resumeEndpointEnabled() {
	beanCreatedAndEndpointEnabled("resumeEndpoint", RestartEndpoint.ResumeEndpoint.class,
			RestartEndpoint.ResumeEndpoint::resume,
			"management.endpoint.restart.enabled=true",
			"management.endpoint.resume.enabled=true");
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:8,代码来源:LifecycleMvcAutoConfigurationTests.java

示例7: restartEndpointWithoutIntegration

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Bean
@ConditionalOnEnabledEndpoint
@ConditionalOnMissingBean
public RestartEndpoint restartEndpointWithoutIntegration() {
	return new RestartEndpoint();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:7,代码来源:RefreshEndpointAutoConfiguration.java

示例8: restartEndpointEnabled

import org.springframework.cloud.context.restart.RestartEndpoint; //导入依赖的package包/类
@Test
public void restartEndpointEnabled() {
	beanCreatedAndEndpointEnabled("restartEndpoint", RestartEndpoint.class,
			RestartEndpoint::restart,
			"management.endpoint.restart.enabled=true");
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-commons,代码行数:7,代码来源:LifecycleMvcAutoConfigurationTests.java


注:本文中的org.springframework.cloud.context.restart.RestartEndpoint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。