本文整理了Java中com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker.shutdown()
方法的一些代码示例,展示了Worker.shutdown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Worker.shutdown()
方法的具体详情如下:
包路径:com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker
类名称:Worker
方法名:shutdown
[英]Signals worker to shutdown. Worker will try initiating shutdown of all record processors. Note that if executor services were passed to the worker by the user, worker will not attempt to shutdown those resources. Shutdown Process When called this will start shutdown of the record processor, and eventually shutdown the worker itself.
代码示例来源:origin: io.zipkin.aws/zipkin-collector-kinesis
@Override
public void close() {
// The executor is a single thread that is tied to this worker. Once the worker shuts down
// the executor will stop.
worker.shutdown();
}
代码示例来源:origin: scopely/kinesis-vcr
public void stop() {
worker.shutdown();
}
代码示例来源:origin: io.macgyver.rx-aws/rx-aws
public void stop() {
worker.shutdown();
}
代码示例来源:origin: harishreedharan/usingflumecode
@Override
protected void doStop() throws FlumeException {
worker.shutdown();
executor.shutdownNow();
}
代码示例来源:origin: awslabs/amazon-kinesis-aggregators
public void shutdown() throws Exception {
this.aggGroup.shutdown(true);
worker.shutdown();
}
代码示例来源:origin: com.amazonaws/amazon-kinesis-client
/**
* Start consuming data from the stream, and pass it to the application record processors.
*/
public void run() {
if (shutdown) {
return;
}
try {
initialize();
LOG.info("Initialization complete. Starting worker loop.");
} catch (RuntimeException e1) {
LOG.error("Unable to initialize after " + MAX_INITIALIZATION_ATTEMPTS + " attempts. Shutting down.", e1);
shutdown();
}
while (!shouldShutdown()) {
runProcessLoop();
}
finalShutdown();
LOG.info("Worker loop is complete. Exiting from worker.");
}
代码示例来源:origin: com.amazonaws/amazon-kinesis-client
this.shutdown();
return GracefulShutdownContext.SHUTDOWN_ALREADY_COMPLETED;
代码示例来源:origin: com.amazonaws/amazon-kinesis-client
context.getWorker().shutdown();
代码示例来源:origin: aws-samples/aws-dynamodb-examples
worker.shutdown();
t.join();
内容来源于网络,如有侵权,请联系作者删除!