Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface Session ... {
- ...
- public interface LockRequest {
- public LockRequest setTimeOut(int timeout);
- ...
- public void lock(Object object);
- }
- public LockRqeust buildLockRequest();
- }
- class SessionImpl ... {
- ...
- private class LockRequestImpl implements LockRequest {
- private LockMode lockMode;
- private int timeout;
- public LockRequest setTimeOut(int timeout) {
- this.timeout = timeout;
- return this;
- }
- ...
- public void lock(Object object) {
- LockEvent lockEvent = ...;
- fireLock( lockEvent );
- }
- }
- public LockRqeust buildLockRequest() {
- return new LockRequest();
- }
- }
Add Comment
Please, Sign In to add comment