简体   繁体   English

Jini / Apache-River和JavaSpaces中的租约到期通知

[英]Notifications of Lease expiration in Jini/Apache-River and JavaSpaces

I've been looking at the use of Lease and specifically their expiration. 我一直在研究Lease的用途,尤其是它们的到期时间。 I am a little confused about how to reflect this expiration in a client side application. 我对如何在客户端应用程序中反映此到期感到有些困惑。 This is pretty trivial using some kind of polling mechanism - but after seeing the implementation of .notify on objects being written to the space, I was wondering if there is something better. 使用某种轮询机制,这非常简单-但是在看到.notify在写入到空间的对象上的实现之后,我想知道是否还有更好的方法。

Is there a way to be notified of a Lease expiration? 有什么方法可以通知租约到期? Or is there some sort of accepted solution on how to poll for these expirations? 还是有一些关于如何轮询这些到期的公认解决方案?

I have read several sources (eg http://www.javacoffeebreak.com/books/extracts/jini/Lease.html ), and they mention ways to be notified of this expiration but I cannot see any examples. 我已经阅读了多个资源(例如, http : //www.javacoffeebreak.com/books/extracts/jini/Lease.html ),并且它们提到了通知该过期的方法,但我看不到任何示例。 JavaDocs hint that LeaseRenewalManager might be of use, but my initial tests haven't really given me anything. JavaDocs暗示LeaseRenewalManager可能有用,但是我的初始测试并没有真正给我任何东西。

After continued research into this, it appears nothing exists for this purpose aside from monitoring Leases via some sort of polling timer (bleh). 在对此进行了深入研究之后,除了通过某种轮询计时器(bleh)监视租约之外,似乎没有其他目的。

Unfortunately this just does not appear to be possible. 不幸的是,这似乎是不可能的。

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

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