Guest User

Untitled

a guest
Jul 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public interface Session ... {
  2. ...
  3.  
  4. public interface LockRequest {
  5. public LockRequest setTimeOut(int timeout);
  6. ...
  7. public void lock(Object object);
  8. }
  9.  
  10. public LockRqeust buildLockRequest();
  11. }
  12.  
  13. class SessionImpl ... {
  14. ...
  15.  
  16. private class LockRequestImpl implements LockRequest {
  17. private LockMode lockMode;
  18. private int timeout;
  19.  
  20. public LockRequest setTimeOut(int timeout) {
  21. this.timeout = timeout;
  22. return this;
  23. }
  24. ...
  25. public void lock(Object object) {
  26. LockEvent lockEvent = ...;
  27. fireLock( lockEvent );
  28. }
  29. }
  30.  
  31. public LockRqeust buildLockRequest() {
  32. return new LockRequest();
  33. }
  34. }
Add Comment
Please, Sign In to add comment