本文整理汇总了Java中org.apache.nifi.annotation.lifecycle.OnDisabled类的典型用法代码示例。如果您正苦于以下问题:Java OnDisabled类的具体用法?Java OnDisabled怎么用?Java OnDisabled使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnDisabled类属于org.apache.nifi.annotation.lifecycle包,在下文中一共展示了OnDisabled类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: shutdown
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdown() {
this.closed = true;
CommsSession commsSession;
while ((commsSession = queue.poll()) != null) {
try (final DataOutputStream dos = new DataOutputStream(commsSession.getOutputStream())) {
dos.writeUTF("close");
dos.flush();
commsSession.close();
} catch (final IOException e) { /* empty */ }
}
if (logger.isDebugEnabled() && getIdentifier() != null) {
logger.debug("Closed {}", new Object[]{getIdentifier()});
}
}
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:17,代码来源:DistributedCacheClient.java
示例2: shutdownServer
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdownServer() {
if (httpServer != null) {
httpServer.close(res -> {
if (res.succeeded()) {
getLogger().info("server stopped");
} else {
getLogger().error("server stop failed!");
}
});
}
if (eventBus != null) {
eventBus.close(res -> {
if (res.succeeded()) {
getLogger().info("eventBus closed");
} else {
getLogger().error("eventBus close failed!");
}
});
}
if (vertx != null) {
vertx.close();
}
}
开发者ID:xmlking,项目名称:nifi-websocket,代码行数:25,代码来源:VertxService.java
示例3: shutdown
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdown() {
if (cache != null) {
cache.removeAll();
}
cache = null;
}
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:8,代码来源:LocalCache.java
示例4: stop
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void stop() throws IOException {
stopServer();
cache.removeAll();
cache = null;
}
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:8,代码来源:DistributedCacheServer.java
示例5: onDisabled
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void onDisabled() {
try {
mongoClient.close();
} catch (final Exception e) {
throw new ProcessException(e);
}
}
开发者ID:Asymmetrik,项目名称:nifi-nars,代码行数:9,代码来源:StandardMongoClientService.java
示例6: shutdown
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdown() {
try {
driver.close();
} catch (final Neo4jException e) {
throw new ProcessException(e);
}
}
开发者ID:jonathantelfer,项目名称:nifi-neo4j,代码行数:9,代码来源:Neo4jBoltSessionPool.java
示例7: disable
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
/**
*
*/
@OnDisabled
public void disable() {
this.connectionFactory = null;
this.configured = false;
}
开发者ID:lsac,项目名称:nifi-jms-jndi,代码行数:9,代码来源:JNDIConnectionFactoryProvider.java
示例8: shutdown
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdown() {
if (connector != null) {
connector = null;
}
}
开发者ID:pinkdevelops,项目名称:nifi-accumulo-service,代码行数:7,代码来源:Accumulo_1_7_0_ConnectorService.java
示例9: shutdown
import org.apache.nifi.annotation.lifecycle.OnDisabled; //导入依赖的package包/类
@OnDisabled
public void shutdown() {
}
开发者ID:bbende,项目名称:nifi-dependency-example,代码行数:5,代码来源:StandardMyService.java
注:本文中的org.apache.nifi.annotation.lifecycle.OnDisabled类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论