當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。