简体   繁体   中英

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

I've been looking at the use of Lease and specifically their expiration. 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.

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. JavaDocs hint that LeaseRenewalManager might be of use, but my initial tests haven't really given me anything.

After continued research into this, it appears nothing exists for this purpose aside from monitoring Leases via some sort of polling timer (bleh).

Unfortunately this just does not appear to be possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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