Skip navigation links

Package locklib

In locklib, a locking target is represented by a Target.

See: Description

Package locklib Description

In locklib, a locking target is represented by a Target. All locks are managed by a LockManager. Holders can be any java object.

To request a lock, a LockRequest is created and requested to the target using Target.lock(LockRequest). This method returns a LockGrantFuture, an object that can be used to synchronously or asynchronously obtain the lock. A lock itself is represented by a LockGrant (which can be obtained from the LockGrantFuture). To release a lock, the LockGrant.release() method should be used.

Skip navigation links

Copyright © 2015. All rights reserved.