简体   繁体   English

如何在不丢失请求的情况下在 REST 端点上排队 REST 请求/暂停处理一段时间?

[英]How to queue up REST requests / halt processing on an REST endpoint for sometime without losing the requests?

I have 2 rest endpoints in my application.我的应用程序中有 2 个休息端点。 I have a requirement to halt processing on the first endpoint when the second one is being invoked.我需要在调用第二个端点时停止第一个端点上的处理。 I would like to process the requests later when the second processing is complete.我想在第二次处理完成后处理请求。 How is this achievable in java?这在java中如何实现? I am using Java -Spark libraries.我正在使用Java -Spark库。 Any thoughts / leads will be highly appreciated!任何想法/线索将不胜感激!

为什么不创建 2 个布尔值来检查它们是否处于活动状态,并在满足您要查找的条件时关闭一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM