Chapter 7. Leases

The biggest difference between time and space is that you can't reuse time.

—Merrick Furst

Leasing provides a manner of allocating resources for a fixed period of time, after which the resource can be freed. This model is beneficial in the distributed environment, where partial failure can cause holders of resources to fail or become disconnected from the resources before they explicitly free them. In the absence of a leasing model, resources could grow without bound.

Spaces allocate resources that are tied to leases. For instance, when you write an entry into a space it is granted a lease that specifies a period of time for which the space guarantees (to the best of its abilities) that it will store the entry. The holder of ...

Get JavaSpaces™ Principles, Patterns, and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.